I'm pretty new to xslt and I'm trying to get the "NiceUrl" from a node, defined on a parent page. Here's how I thought doing it:
To get a reference to the link on the parent page, one would use: <xsl:variable name="homelink" select="$currentPage/ancestor-or-self::node [string(data[@alias='homelink'])!=''] [position()=1] /data[@alias='homelink']"/>
To convert a link from a "content picker" datatype to a real link, one would use: <xsl:variable name="whatlink" select="umbraco.library:NiceUrl($currentPage/data[@alias='whatlink'])"/>
Now I want to combine both: get the real URL pointing to a "content-picker" datatype from a parent page. Hence I thought combining both items above into the following: <xsl:variable name="testlink" select="umbraco.library:NiceUrl($currentPage/ancestor-or-self::node [string(data[@alias='homelink'])!=''] [position()=1] /data[@alias='homelink'])"/>
When trying to save this last "testlink" I only get the following error messages:
(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter) at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
recursive nice URL
I'm pretty new to xslt and I'm trying to get the "NiceUrl" from a node, defined on a parent page. Here's how I thought doing it:
<xsl:variable name="homelink" select="$currentPage/ancestor-or-self::node [string(data[@alias='homelink'])!=''] [position()=1] /data[@alias='homelink']"/>
<xsl:variable name="whatlink" select="umbraco.library:NiceUrl($currentPage/data[@alias='whatlink'])"/>
<xsl:variable name="testlink" select="umbraco.library:NiceUrl($currentPage/ancestor-or-self::node [string(data[@alias='homelink'])!=''] [position()=1] /data[@alias='homelink'])"/>
When trying to save this last "testlink" I only get the following error messages:
Wha
please refer to this link... http://our.umbraco.org/forum/developers/xslt/9526-recursive-nice-URL
is working on a reply...