Formatting
Hi,
I have a field in my DD that is required, If I uncheck that it
is required, it messes up the formatting by wrapping an
<h2>
around everything. Instead of just not
showing the h2. Could you please look at the code.
Attached is the code.
- staff-directory.xml 3.75 KB
- staff-directory-dd.xml 4 KB
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 23 Feb, 2016 06:13 PM
Hi Ellen,
You should be able to surround the
<h2>
with a conditional that checks to see if the heading has a value or not. Something like the following should do the trick:Please let me know if you have any questions.
Thanks!
2 Posted by ellen.donovan on 23 Feb, 2016 06:31 PM
Yes, that did the trick. My attempt looked like this.
#set ( $heading = $directory.getChild("heading") )
#if ($heading.value != "")
$_SerializerTool.serialize($heading, true))
#end
<h2>$_EscapeTool.xml($heading.value)</h2>
3 Posted by Ryan Griffith on 23 Feb, 2016 06:34 PM
Thank you for following up, Ellen. I am glad to hear my suggestion did the trick.
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.
Have a great day!
Ryan Griffith closed this discussion on 23 Feb, 2016 06:34 PM.
ellen.donovan re-opened this discussion on 23 Feb, 2016 06:43 PM
4 Posted by ellen.donovan on 23 Feb, 2016 06:43 PM
Thank you
Tim closed this discussion on 23 Feb, 2016 06:43 PM.