tag:help-archives.hannonhill.com,2010-02-09:/discussions/xslt-formats/6583-formattingCascade CMS: Discussion 2018-10-18T20:37:50Ztag:help-archives.hannonhill.com,2010-02-09:Comment/392421052016-02-23T18:13:53Z2016-02-23T18:13:53ZFormatting<div><p>Hi Ellen,</p>
<p>You should be able to surround the <code><h2></code> with
a conditional that checks to see if the heading has a value or not.
Something like the following should do the trick:</p>
<pre>
<code>...
#set ( $heading = $directory.getChild("heading"))
#if ($heading.value != '')
<h2>$_EscapeTool.xml($heading.value)</h2>
#end
...</code>
</pre>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/392421052016-02-23T18:31:38Z2016-02-23T18:31:38ZFormatting<div><p>Yes, that did the trick. My attempt looked like this.</p>
<p>#set ( $heading = $directory.getChild("heading") ) #if
($heading.value != "") $_SerializerTool.serialize($heading,
true))</p>
<p>#end</p>
<h2>$_EscapeTool.xml($heading.value)</h2></div>ellen.donovantag:help-archives.hannonhill.com,2010-02-09:Comment/392421052016-02-23T18:34:23Z2016-02-23T18:34:23ZFormatting<div><p>Thank you for following up, Ellen. I am glad to hear my
suggestion did the trick.</p>
<p>I'm going to go ahead and close this discussion, please feel
free to comment or reply to re-open if you have any additional
questions.</p>
<p>Have a great day!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/392421052016-02-23T18:43:20Z2016-02-23T18:43:20ZFormatting<div><p>Thank you</p></div>ellen.donovan