hide div in macro if no content is added - Xslt - our.umbraco.org


/ Published in: ASP
Save to your folder(s)

hide div in macro if no content is added - Xslt - our.umbraco.org


Copy this code and paste it in your HTML
  1. <div id="testimonial">
  2. <span>Testimonial</span>
  3. <xsl:if test="$currentPage/testimonial != ''">
  4. <h1><xsl:value-of select="$currentPage/data [@alias = 'testimonial']" /></h1>
  5. </xsl:if>
  6. <xsl:if test="$currentPage/testimonialName != ''">
  7. <h2><xsl:value-of select="$currentPage/data [@alias = 'testimonialName']" /></h2>
  8. </xsl:if>
  9. <xsl:if test="$currentPage/testimonialDetails != ''">
  10. <p><xsl:value-of select="$currentPage/data [@alias = 'testimonialDetails']" /></p>
  11. </xsl:if>
  12. </div>

URL: http://our.umbraco.org/forum/developers/xslt/14500-Hide-Div-in-Macro-if-no-content-is-added

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.