We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50659
    • 2 Posts
    Hi I am having a problem where output is not being produced under certain circumstances. Using Revo latest- 2.3.5

    The Template Code:
    <p><b>section 1</b></p>
    [[[[*imageSide5:is=`none`:then=`$phrText? &content=`[[*content5]]`` ]]]]
    <p><b>section 2</b></p>
    [[[[*imageSide5:is=`none`:then=`$phrText? &content=[[*content5]]` ]]]]
    <p><b>section 3</b></p>
    [[$phrText? &content=[[*content5]]]]
    <p><b>END</b></p>

    The Chunk phrText:
    [[+content]]

    The value of content5:
    <p>text "he@llo"  here is an @ sign</p>
    <p><a href="mailto:[email protected]">Send mail</a></p>

    The output:
    section 1
    section 2
    section 3
    END


    Without the mailto line in content 5, I get
    section 1
    section 2
    text "he@llo" here is an @ sign
    section 3
    text "he@llo" here is an @ sign
    END


    I am probably missing something obvious to people using modx day in and out. But I have not been able to diagnose or find anything online that appeared to help.

    Thanks in advance.

    Regards

    Martin

    This question has been answered by sottwell. See the first response.

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      It helps if you enclose your code blocks in code tags (use the little <> icon in the editing toolbar)
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Ok, I got it to work like this:

        Template code like this, everything else the same as you have it.
        <p><b>section 1</b></p>
        [[*imageSide5:is=`none`:then=`[[*content5]]`]]
        <p><b>section 2</b></p>
        [[*imageSide5:is=`none`:then=`[[*content5]]`]]
        <p><b>section 3</b></p>
        [[$phrText? &content=`[[*content5]]`]]
        <p><b>END</b></p>


          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
        • discuss.answer
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          And it also works like this:
          <p><b>section 1</b></p>
          [[*imageSide5:is=`none`:then=`[[$phrText? &content=`[[*content5]]`]]`]]
          <p><b>section 2</b></p>
          [[*imageSide5:is=`none`:then=`[[$phrText? &content=`[[*content5]]`]]`]]
          <p><b>section 3</b></p>
          [[$phrText? &content=`[[*content5]]`]]
          <p><b>END</b></p>


          However, adding the extra layer of complexity of using the chunk as the output doesn't work.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 50659
            • 2 Posts
            Thank you very much for your assistance. This now works fine. The reason for using a chunk is because I pass other parameters eg image and position.

            Help is greatly appreciated.

            Regards Martin