I have used the Embedded Content Package to create a partners contact page.
My issue is with removing the the <li> tag if the field has been left empty. Just now the <li> is collpased, so it doesnt affect the appearance, but I would like to not to output the <li> tag if it is not required.
Remove <li> tag if field is not populated
Hi all, im having some trouble with my XSLT.
I have used the Embedded Content Package to create a partners contact page.
My issue is with removing the the <li> tag if the field has been left empty. Just now the <li> is collpased, so it doesnt affect the appearance, but I would like to not to output the <li> tag if it is not required.
My xslt is.
Any help would be grateful.
Martin
Hi Martin,
Though you could get away with a simple <xsl:if> to test whether a field has content, the "XSLT way" of doing something like this, is more like this:
/Chriztian
Thanks Chriztian,
The generic template seem to override the email, telephone & web.
Hi Martin,
Have you tried putting the generic template as last in the xslt file?
Cheers,
Michael.
Edit: Or set the priority to "2" on the not generic templates?
Yeah, ive tried moving the generic template to after the email, tele, web templates.
It still overrides the other templates.
EDIT: Thanks Micheal. Setting the priority on the other templates worked. Thanks
Great!
Can you maybe mark that post as an answer, so it can help others with similar problems? Thx!
Cheers,
Michael.
is working on a reply...