xslt newbie question - where does path variable come from?
I'm having trouble getting the links to folders in Cascade. I keep getting the Cascade root folder name included when I do my XSLT. I'm not sure where this is coming from. Here's the code that I'm using.
<xsl:template match="system-folder" mode="main">
<ul>
<li><a><xsl:attribute name="href"><xsl:value-of select="path/text()"/></xsl:attribute><xsl:value-of select="display-name/text()"/></a>
</xsl:template>
What I want this to return is www.oururl.com/the-folder-name.
What I'm getting instead is www.oururl.com/cascade-root-folder/the-folder-name
Thanks!
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Ryan Griffith on 17 Aug, 2012 08:20 PM
Hi Irene,
Cascade tracks and rewrites the paths for Pages and Files, but not Folders. You are seeing the Cascade root folder because the path is not being rewritten on publish. Typically in this situation, you will see a Format use a path to an index page (or whatever your environment determines as the starting page for a directory). For example:
You can remove the link to the index page using something like mod_rewrite for Apache (you might see something like this in an .htaccess file).
Please let us know if you have any questions.
Thanks.
Support Staff 3 Posted by Ryan Griffith on 12 Sep, 2012 12:13 PM
Hi Irene,
Just wanted to follow up to see if you had a chance to view my recent comment. Were you able to get your Format working?
Please let us know if you have any questions.
Thanks.
Ryan Griffith closed this discussion on 20 Sep, 2012 06:19 PM.