Issue with img src getting converted to a relative path

bkbrooks's Avatar

bkbrooks

09 Feb, 2015 09:36 PM

Hello!

I am having issues with an xslt format that is rendering an img src attribute to be a relative path instead of using the path attribute from the index block. Here's what my xslt code looks like:

<img>
     <xsl:attribute name="alt"><xsl:value-of select="nms-image-caption"/></xsl:attribute>
     <xsl:attribute name="src"><xsl:value-of select="nms-image-file/path"/></xsl:attribute>
</img>

Then it is rendering like this by Cascade:
<img alt="Follow the daily lives of 18 undergraduate students, one blog post at a time." src="/renderfile/09367f7f8e689c867997c1007bb99508/communications-images/billboard-myuviclife-2015.jpg"/>

Then, when I publish it gets converted to this:
<img alt="Follow the daily lives of 18 undergraduate students, one blog post at a time." src="../../../../../communications-images/billboard-myuviclife-2015.jpg"/>

I would like the link to have the src be EXACTLY what is in the path, like this:
<img alt="Follow the daily lives of 18 undergraduate students, one blog post at a time." src="/communications-images/billboard-myuviclife-2015.jpg"/>

Is there a way to stop Cascade from converting the link and just leave it as is?

Thanks,

Blair

  1. 1 Posted by bkbrooks on 10 Feb, 2015 08:40 PM

    bkbrooks's Avatar

    I managed to figure out the problem! I noticed under the "system" tab when editing a page, there is a "Maintain absolute links when publishing" checkbox. I don't know how I've never noticed it there before, but my problem is solved!

  2. Support Staff 2 Posted by Tim on 10 Feb, 2015 08:50 PM

    Tim's Avatar

    Hi there,

    So sorry for the delayed response! I'm glad you were able to figure it out on your own. I just sent you an invite to our Idea Exchange because I figured you may be interested in this related idea which would allow for you to set this particular property for multiple pages at once (rather than individually as you have to do now). I encourage you to vote/comment on that idea if this is something you'd like to see in the application.

    Thanks!

  3. Tim closed this discussion on 10 Feb, 2015 08:50 PM.

  4. bkbrooks re-opened this discussion on 10 Feb, 2015 09:23 PM

  5. 3 Posted by bkbrooks on 10 Feb, 2015 09:23 PM

    bkbrooks's Avatar

    Thanks Tim!

    I’ve signed up and I’ll take a look at the suggestions over time and maybe even make some of my own. I’m doing what I think is some pretty advanced stuff in Cascade.

    Blair

  6. Support Staff 4 Posted by Tim on 10 Feb, 2015 09:56 PM

    Tim's Avatar

    Sounds good, Blair. Take care!

  7. Tim closed this discussion on 10 Feb, 2015 09:56 PM.

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

Keyboard shortcuts

Generic

? 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