Image Formating

Rachel Oakland's Avatar

Rachel Oakland

18 Aug, 2015 11:52 PM

I'm having trouble getting the images to display properly for our news highlight section. All of the other information displays perfectly and I have managed to get the items limited to three but the same picture is showing up for each story. I've tried several variations and I either end up with the same picture over and over again or no pictures at all.

  1. 1 Posted by Ryan Griffith on 19 Aug, 2015 12:05 PM

    Ryan Griffith's Avatar

    Hi Rachel,

    It looks like you are on the right track, but I am seeing a couple of issues:

    • When testing for a chosen asset, test if the path is /, not the link. This is because when there is no chosen asset, the link will not be present. Example: <xsl:if test="chooser-field/path != '/'">
    • You are already inside of a system-page template, so using //system-page will not work and will output the first system-page found within the XML. Instead use the following:
      <xsl:if test="system-data-structure/main-image/link != '/'">
      <img alt="{system-data-structure/main-image/name}" height="165" src="{system-data-structure/main-image/link}" width="250"/>

    Please let me know if you have any questions.


  2. 2 Posted by Rachel Oakland on 19 Aug, 2015 01:40 PM

    Rachel Oakland's Avatar

    Hi Ryan

    Thank you so much for the quick response. That worked perfectly! I thought I had tried to remove the system page portion from the if test but I guess I didn't change both things at once.

    Thanks again.


  3. 3 Posted by Ryan Griffith on 19 Aug, 2015 03:50 PM

    Ryan Griffith's Avatar

    Not a problem at all, Rachel, I am glad to hear my proposed changes did the trick.

    I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  4. Ryan Griffith closed this discussion on 19 Aug, 2015 03:50 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac


26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM