I'm trying to create a Testimonial macro. Where the user enters a "testimonial" a "testimonial name" and "testimonial details".
I've inserted the macro in the template as I want the user to have the option of adding a testimonial to any page, however if no information is typed into the fields then the macro including the DIV do not display.
I've added a true/false option on the following alias - displayTestimonial
Which isn't a bad option as they might enter a Testimonial onto that page, but later want to hide that testimonial.
Seems you're mixing two different xml schema's. Your test uses the old schema whereas you display data using the new xml schema. So either change your test to
Hide Div in Macro if no content is added
Hi all,
I'm trying to create a Testimonial macro. Where the user enters a "testimonial" a "testimonial name" and "testimonial details".
I've inserted the macro in the template as I want the user to have the option of adding a testimonial to any page, however if no information is typed into the fields then the macro including the DIV do not display.
I've added a true/false option on the following alias - displayTestimonial
Which isn't a bad option as they might enter a Testimonial onto that page, but later want to hide that testimonial.
Here's the XSLT I've been working on so far:
Seems you're mixing two different xml schema's. Your test uses the old schema whereas you display data using the new xml schema. So either change your test to
and output the content using the statements in your snippet or keep your test statement and use
So, depending on your settings for
use the first (true) or second code (false) snippet
Hope this helps.
Regards,
/Dirk
Thanks Dirk,
I used the first option and it's now working, thanks for your help!
Cheers,
JV
is working on a reply...