Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I am getting an error when try to save a xslt file, Please help me, where am I going wrong?
my code is
<xsl:variable name="sampleLink1" select="$currentPage/data[@alias='sampleLink1']" /><a href="{umbraco.library:NiceUrl($sampleLink1)}"><xsl:value-of select="$currentPage/data[@alias = 'registerHeading']"/></a>
<xsl:variable name="sampleLink2" select="$currentPage/data[@alias='sampleLink2']" /><a href="{umbraco.library:NiceUrl($sampleLink2)}"><xsl:value-of select="$currentPage/data[@alias = 'registerHeading']"/></a>
---------------------------------------------------------------------------------------
(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)
-------------------------------------------------------------------------------------------
My folder structure is
Homepage (sampleLink1 & SampleLink2 contentpicker are defned)
SampleLinkPage1
SampleLinkPage2
Thanks,
Aradhya
Try using an xsl:if
<xsl:variable name="sampleLink1" select="$currentPage/data[@alias='sampleLink1']" /><xsl:if test="$sampleLink1 != ''"> <a href="{umbraco.library:NiceUrl($sampleLink1)}"> <xsl:value-of select="$currentPage/data[@alias = 'registerHeading']"/> </a></xsl:if>
Ron
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Error with NiceUrl
Hi,
I am getting an error when try to save a xslt file, Please help me, where am I going wrong?
my code is
<xsl:variable name="sampleLink1" select="$currentPage/data[@alias='sampleLink1']" />
<a href="{umbraco.library:NiceUrl($sampleLink1)}"><xsl:value-of select="$currentPage/data[@alias = 'registerHeading']"/></a>
<xsl:variable name="sampleLink2" select="$currentPage/data[@alias='sampleLink2']" />
<a href="{umbraco.library:NiceUrl($sampleLink2)}"><xsl:value-of select="$currentPage/data[@alias = 'registerHeading']"/></a>
---------------------------------------------------------------------------------------
(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)
-------------------------------------------------------------------------------------------
My folder structure is
Homepage (sampleLink1 & SampleLink2 contentpicker are defned)
SampleLinkPage1
SampleLinkPage2
Thanks,
Aradhya
Hi,
Try using an xsl:if
Ron
is working on a reply...