Jump to content

How to add images?

Featured Replies

Posted

I made a car review page with IP Content with Title, description and image field and sadly images are displaying so weird, instead of neat thumbnails in end or in top. 

Please help in advising how to add images correctly in IP Content 4.0.9 Thanks.

http://carnity.org/car-reviews/records/2016-audi-q7-r1/

Capture.JPG

  • Author

Gentle reminder guys, am I asking so impossible thing or is it known bug and everyone here is quite and patiently waiting for the full moon....?

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

  • Author

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

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

  • Author

Thanks Ralf,

For prompt reply, can you please explain how he can edit different template for different pages...? 

One just creates a new template, which then can be assigned to any database one wants in the database settings. That was no different in 3.4. 

  • Author

Thanks Ralf, your code brought some immediate relief in images display and I shared same with my programmer for more details. Hope he should be able to fix things with your help now. Really appreciate your help.

  • 4 weeks later...
  • Author

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

Archived

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

Recently Browsing 0

  • No registered users viewing this page.