Error in Outputting Text

msyed1984's Avatar


08 May, 2014 09:11 PM

This may be something basic, but here is my code:

#set ($manzitems= $_XPathTool.selectNodes($contentRoot, '//customaccd/customaccd-items'))
#foreach ($manzi in $manzitems)
#if ($manzi)
#set ($accdheader = $_EscapeTool.xml($manzi.getChild('customaccd-header').text))
    <p class="expander-header">$accdheader</p>
#set ($accdcontent = $_EscapeTool.xml($manzi.getChild('customaccd-content').text))
    <div class="expander-content">

I'm not able to output any text for the content section if it is anything other than plaintext. I thought by using the escape tool we avoid that issue?

  1. 1 Posted by Ryan Griffith on 09 May, 2014 12:11 PM

    Ryan Griffith's Avatar


    Is the customaccd-content field a WSYIWYG field by chance? If so, try using the Serializer Tool to serialize the HTML content within the field:

    #set ($accdcontent = $_SerializerTool.serialize($manzi.getChild('customaccd-content'), true))

    Give this a try and let me know how this works out.

    Please let me know if you have any questions.


  2. 2 Posted by msyed1984 on 12 May, 2014 07:44 PM

    msyed1984's Avatar

    This fixed the issue thanks!


  3. 3 Posted by Ryan Griffith on 12 May, 2014 08:05 PM

    Ryan Griffith's Avatar

    Thank you for following up, Manzi. I am glad to hear the adjustment 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!

  4. Ryan Griffith closed this discussion on 12 May, 2014 08:05 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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