ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Blank Output from XHTML Textareas

November 09, 2009 1:24pm

Subscribe [4]
  • #1 / Nov 09, 2009 1:24pm

    taktak

    24 posts

    Hi there,

    I posted another thread about getting blank outputs using LG TinyMCE fields, but it got moved to the extensions forum. I’ve since realised actually it has nothing to do with TinyMCE - my fields are now simply XHTML Textareas and the problem persists.

    So, here is my problem:

    I have weblog with two XHTML Textarea fields.
    I place markup such as the following in field number 1 (called body-main):

    Lorem
    <h3>Title</h3>
    <p><ul><br />
    <li>List Item</li><br />
    </ul><br />
    <a href="http://jmar777.googlecode.com/svn/trunk/images/photoshop/dirty/blue_gradient.jpg">http://jmar777.googlecode.com/svn/trunk/images/photoshop/dirty/blue_gradient.jpg</a>

    My template looks like:

    <div class="middle-content">
       {body-main}
    </div>
    {if "{body-bottom}"}
       <div class="bottom-content">
          {body-bottom}
       </div>
    {/if}

    Pretty basic - put the body-main field contents in one div, and the body-bottom field contents in the other div.

    Ok so I save this out, and yes it works fine. Now I come to put the very same markup that I put in the first field, into field number 2 (body-bottom).

    What happens? The output for my whole template is blank.

    Any ideas?

  • #2 / Nov 09, 2009 5:33pm

    Ingmar

    29245 posts

    A few things: First, I don’t understand why you chose Formatting “XHTML” if you provide all the markup yourself. Wouldn’t “None” be better in your case? Secondly, you should not brace your conditionals or use the deprecated {if foo} short form. Use this:

    {if body-bottom != ""} ... {/if}

    Is the error triggered by putting the same content in both fields? Or did you have something else in the first field when you tried it? What version and build of EE are you on, anyway?

  • #3 / Nov 10, 2009 7:20am

    taktak

    24 posts

    Ingmar, thanks very much for helping. It was down to the conditionals - getting rid of the short form and braces seems to have solved the issue. Strange how they worked some of the time with some markup, and broke with other markup.

    Silly mistake, I probably wouldn’t have spotted this for ages, so again thanks very much.

  • #4 / Nov 10, 2009 8:14am

    Sue Crocker

    26054 posts

    Glad Ingmar was able to help. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases