/ Published in: ASP
hide div in macro if no content is added - Xslt - our.umbraco.org
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<div id="testimonial"> <span>Testimonial</span> <xsl:if test="$currentPage/testimonial != ''"> <h1><xsl:value-of select="$currentPage/data [@alias = 'testimonial']" /></h1> </xsl:if> <xsl:if test="$currentPage/testimonialName != ''"> <h2><xsl:value-of select="$currentPage/data [@alias = 'testimonialName']" /></h2> </xsl:if> <xsl:if test="$currentPage/testimonialDetails != ''"> <p><xsl:value-of select="$currentPage/data [@alias = 'testimonialDetails']" /></p> </xsl:if> </div>
URL: http://our.umbraco.org/forum/developers/xslt/14500-Hide-Div-in-Macro-if-no-content-is-added