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.

Automatically inserted paragraphs

March 22, 2008 2:55pm

Subscribe [2]
  • #1 / Mar 22, 2008 2:55pm

    Richard Kiss

    20 posts

    hello,

    I wanna write this info in 1 row:

    <div>My year of birth is {year} and I competed in the {categories}{category_name}{/categories} category.</div>

    But the EE inserts the the following html code:
    <div>My year of birth is 1966
    an I competed in the Science category.</div>

    There is a paragraph so I cannot write in 1 line. Why? How can I modify this stupid function?

  • #2 / Mar 22, 2008 3:06pm

    Sue Crocker

    26054 posts

    Richard, set the formatting of the field {year} to none, and you won’t see those paragraph marks.

    Make sense?

  • #3 / Mar 22, 2008 3:12pm

    Richard Kiss

    20 posts

    Sue,

    the CSS formatting of that field make it to bold and red but in my CSS no any paragraph.

    So if I set it to none then I see those paragraphs too. I tried it.

    so what is the real solution?

  • #4 / Mar 22, 2008 3:47pm

    Sue Crocker

    26054 posts

    Ignoring your CSS for the moment…

    If you put in {year} like this:

    This is a test of {year}.

    Inside your exp:weblog:entries tag, does that work?

    Did you manually change the formatting for that particular entry to use none instead of xhtml?

  • #5 / Mar 22, 2008 3:59pm

    Richard Kiss

    20 posts

    okay, here is the test version my blog without any CSS formatting.
    http://www.oracle.hu/test/paragraph

  • #6 / Mar 22, 2008 4:00pm

    Richard Kiss

    20 posts

    and I checked and found all field of all entry is XHTML formatted.

  • #7 / Mar 23, 2008 10:34am

    Robin Sowell

    13255 posts

    Custom fields have a ‘field formatting’ type- default options: xhtml, br, and none.  See the docs for details on what each option does.

    If you don’t want any formatting applied to a field, you’ll want to set the formatting option to ‘none’- in which case, EE won’t (generally) add any formatting.  Which is what it sounds like you want.

    If you go to ‘Admin- Weblog Admin- Custom Weblog Fields’ and edit the fields you want set to none- when you change the default format to ‘none’ you’ll get a checkbox near the submit asking if you want that format applied retroactively.  Click it- submit.  All entries should then have that field set to none- and no formatting should be added.

    Does that do the trick?

  • #8 / Mar 23, 2008 11:43am

    Richard Kiss

    20 posts

    thanks, its okay

  • #9 / Mar 23, 2008 11:48am

    Robin Sowell

    13255 posts

    Glad you’re squared away!

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

ExpressionEngine News!

#eecms, #events, #releases