I am having problems doing something very simple such as using the content picker to make a link. Is there a new syntax I am not aware off ? I am running "umbraco v 4.11.8 (Assembly version: 1.0.4869.17899)"
Here is the code: (I am sure that id1 contains the node ID of the content picker)
Error:
Error occured
System.OverflowException: Værdien var enten for stor eller for lille til en Int32.
ved System.Convert.ToInt32(Double value)
ved System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
ved System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType)
ved System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
ved (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
ved Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
ved System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
ved System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
ved umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
Get URL from content picker issue
Hi
I am having problems doing something very simple such as using the content picker to make a link. Is there a new syntax I am not aware off ? I am running "umbraco v 4.11.8 (Assembly version: 1.0.4869.17899)"
Here is the code: (I am sure that id1 contains the node ID of the content picker)
Error:
Code:
Ok I found an answer allready in this forum. I had to surround the output with an If/then statement like this:
<xsl:if test="string($id1) != ''">
<a href="{umbraco.library:NiceUrl($id1)}">
<img src="/images/temp-teaser.jpg" alt="" />
</a>
</xsl:if>
Answer here: http://our.umbraco.org/forum/developers/xslt/1840-NiceUrl-problem
/Brian
is working on a reply...