News entry with more than one image?

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
Freehand
Posts: 11
Joined: Wed 4. Mar 2009, 15:55
Location: Herning, Denmark
Contact:

News entry with more than one image?

Post by Freehand »

Is this possible? And how?

Thanks in advance :-)
:: I live to learn ::
User avatar
Freehand
Posts: 11
Joined: Wed 4. Mar 2009, 15:55
Location: Herning, Denmark
Contact:

Re: News entry with more than one image?

Post by Freehand »

– more than one image in the detail view, that is... :-)
:: I live to learn ::
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Re: News entry with more than one image?

Post by pepe »

It's possible by using the {SHOW_CONTENT:CP;XXX} ReplacementTag to include so another contentPart with images out of your installation !
User avatar
Freehand
Posts: 11
Joined: Wed 4. Mar 2009, 15:55
Location: Herning, Denmark
Contact:

Re: News entry with more than one image?

Post by Freehand »

Thanks, I suspected something like that :-)

Easy for me, but maybe not so easy for my generally code-scared clients. Would be great with an advanced "News" CP with implemented "Images"-section. Would build it if I had the skills ;-)

But thanks again, the "SHOW CONTENT"-solution is working :-)
:: I live to learn ::
zuker
Posts: 80
Joined: Fri 18. May 2007, 17:13
Location: Lithuania

Re: News entry with more than one image?

Post by zuker »

Hi,
I need to display more than one image in news detail view to. And here is workaround how to do it.

At the beginning of news template place :

Code: Select all

   
     <!--NEWS_SETTINGS_START//-->
    ; how many news should be listed per row
    news_per_row = 2
    ; teaser text rendered as <p></p> = p
    ; or just line break to <br> = br
    news_teaser_text = br

    ; template for files - the same as used
    ; for content part files , default:
    ; files_template_list = default
    ; files_template_list = news.html
    files_template_detail = news_detail.html
    files_direct_download = 0

    <!--NEWS_SETTINGS_END//-->
Create files/images template ( template/inc_cntpart/news/news_detail.html )

Template: news_detail.html

Code: Select all

<!--FILE_SETTINGS_START//-->
; this is formatted like WIN.INI
; please: do not use comments for value lines
icon_path       = "img/icons/"
icon_name       = "small_icon_{FILE_EXT}.gif"
; alternatively use "small_icon_pix.gif" for all images/files
thumbnail     = 1
thumbnail_width   = 165
thumbnail_height  = 125
thumbnail_crop    = 1
; lighbox_init [0|1] since V1.4.2 r354 available: Enable only when really needed
lightbox_init     = 1
file_size_round   = 1
file_size_space   = " "
date_format     = "%d.%m.%y"
set_locale      = "de_DE@Euro"
<!--FILE_SETTINGS_END//-->
[TITLE]<h4>{TITLE}</h4>[/TITLE]
[SUBTITLE]<h5>{SUBTITLE}</h5>[/SUBTITLE]
[TEXT]{TEXT}[/TEXT]
<div style="margin-top: 15px; padding-top: 10px; border-top: 1px dotted #CCCCCC;">
<!--FILE_ENTRY_START//-->
   <div class="fileEntry" style="float:left;padding:0px; margin:0px 6px 6px 0;">
      [FILE_IMAGE_ELSE]<img src="{FILE_ICON}" alt="" border="0" />[/FILE_IMAGE_ELSE]
      [FILE_IMAGE]
      <div style="float: left; padding:5px; margin: 0px; border:1px solid #A58F70;">
        <a href="img/cmsimage.php/500x480/{FILE_ID}.{FILE_EXT}" rel="lightbox[XYZ]" title="{FILE_TITLE}" target="_blank">
        <img src="{FILE_IMAGE}" alt="{FILE_NAME}" border="0" /></a>
      </div>
      [/FILE_IMAGE]		
  </div>
 
<!--FILE_ENTRY_END//-->
</div>
For me it works ;)
٩(͡๏̯͡๏)۶
Post Reply