Jump to content

How to add images?


Gauravk

Recommended Posts

It isn’t a bug. By default, additional database fields will be shown as inline list above the body field. For other positions and layouts you would need a customized article template. 

But to offer a simpler solution: Go to your image field settings. Go to the display options tab and scroll down to the Display View Format of the Display Template. Select “Custom” there and put this in the text field. 

<div class="ipsClearfix">
{{foreach $value as $image}}
  <a href='{file="$image" extension="cms_Records"}' class='ipsAttachLink ipsAttachLink_image' rel='external nofollow' target='_blank' data-ipslightbox='' data-ipslightbox-group="g1">
  <img style="height:100px" src='{file="$image" extension="cms_Records"}'>
  </a>
{{endforeach}}
</div>

Your images will then be shown like this:

Bildschirmfoto_2015-07-12_um_19.02.16.th

Link to comment
Share on other sites

Thanks Ralf,

I will send this editing possibility to the programmer. On a separate note see the last frustrating comment from a programmer who worked in previous version, Is there is any he can edit different templates for different IP Content pages: Classified, Business Listing etc in carnity.org? And how he can get hold of all individual fields? (see below comment from him).

The main problem is that I cannot access the values one by one.

In the last version it was like:

{$r['price']}
{$r['trim_option']}
...

In this version it is just:

{{foreach $record->customFieldsForDisplay('listing') as $fieldId => $fieldValue}}
{{if $fieldValue}}
{$fieldValue|raw}
{{endif}}
{{endforeach}}

--> I cannot style the values individually

Link to comment
Share on other sites

Is there is any he can edit different templates for different IP Content pages: Classified, Business Listing etc

Certainly. 

And how he can get hold of all individual fields? (see below comment from him).

The new field calls are all explained in the field settings.

 Bildschirmfoto_2015-07-12_um_19.45.41.th

Link to comment
Share on other sites

  • 4 weeks later...

Hi Ralf,

Im using your suggest codes for images in few areas and seeing some images broken icon or images are not loading at all. Can you please help.

And every time any of the broken image page load it logs the attached error.

<br><br><div class="ipsClearfix">
{{foreach $value as $image}}
  <a href='{file="$image" extension="cms_Records"}' class='ipsAttachLink ipsAttachLink_image' rel='external nofollow' target='_blank' data-ipslightbox='' data-ipslightbox-group="g1">
  <img style="height:100px" src='{file="$image" extension="cms_Records"}'>
  </a>
{{endforeach}}
</div><br>

 

Capture.jpg

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...