Issue with img src getting converted to a relative path
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
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
1 Posted by bkbrooks on 10 Feb, 2015 08:40 PM
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!
Support Staff 2 Posted by Tim on 10 Feb, 2015 08:50 PM
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!
Tim closed this discussion on 10 Feb, 2015 08:50 PM.
bkbrooks re-opened this discussion on 10 Feb, 2015 09:23 PM
3 Posted by bkbrooks on 10 Feb, 2015 09:23 PM
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
Support Staff 4 Posted by Tim on 10 Feb, 2015 09:56 PM
Sounds good, Blair. Take care!
Tim closed this discussion on 10 Feb, 2015 09:56 PM.