I have a footer link that is set via a Content Picker on various multi-lingual homepages. This link needs to only display when a page has been selected in the admin. I've hacked it together by hiding it in jQuery like so:
If you made an XSLT macro rather than using an inline XSLT call then you could easily control wether or not the link should be rendered.
Then you also avoid using JavaScript for doing it.
Another way could be to create a XSLT macro instead of inline XSLT, personally I think it more easier to create checks in a separate XSLT than Inline XSLT.
Hide umbraco:field if empty?
Hi,
I have a footer link that is set via a Content Picker on various multi-lingual homepages. This link needs to only display when a page has been selected in the admin. I've hacked it together by hiding it in jQuery like so:
But ideally, I'd rather do something like:
What would the syntax be please?
Hi Dominic
If you made an XSLT macro rather than using an inline XSLT call then you could easily control wether or not the link should be rendered. Then you also avoid using JavaScript for doing it.
in xslt it could be something like
Does this make sense?
/Jan
Hi Dominic,
Did you see this documentation http://our.umbraco.org/wiki/how-tos/xslt-useful-tips-and-snippets/make-umbraco-fields-disappear-when-null,-using-in-line-xslt
Another way could be to create a XSLT macro instead of inline XSLT, personally I think it more easier to create checks in a separate XSLT than Inline XSLT.
Hope this can help you further.
/Dennis
is working on a reply...