Which works just fine if there's an actual image being selected and uploaded by the user.
But if the property field is blank, then it will error out unable to parse the XSLT. This error came up last Friday in C#, and I spent this morning converting the behavior to an XSLT macro.
When the error was in C#, the value I would get back on these umbraco.library calls for elements without content was "umbraco.presentation.nodeFactory.Property". This filler content tricked the if test, and would continue on through the remaining code.
Can anyone help with a solution on how to test if a non-manditory property has content so I can style pages accordingly?
How to test if an Umbraco property is used
Hi All,
I've been working on an issue, and it basically comes down to the behavior of pulling umbraco.library.
In C# and in XSLT I'm doing simple checks to see if the user has entered a value into a property field. In XSLT, my code appears as such:
Which works just fine if there's an actual image being selected and uploaded by the user.
But if the property field is blank, then it will error out unable to parse the XSLT. This error came up last Friday in C#, and I spent this morning converting the behavior to an XSLT macro.
When the error was in C#, the value I would get back on these umbraco.library calls for elements without content was "umbraco.presentation.nodeFactory.Property". This filler content tricked the if test, and would continue on through the remaining code.
Can anyone help with a solution on how to test if a non-manditory property has content so I can style pages accordingly?
Thank you all for your time,
Nathan
is working on a reply...