Posted By

thesmu on 03/06/13


Tagged

umbraco


Versions (?)

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


 / Published in: ASP
 

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

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

  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>

Report this snippet  

You need to login to post a comment.