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.

Unexpected line return after expressionengine code

October 12, 2011 2:51pm

Subscribe [4]
  • #1 / Oct 12, 2011 2:51pm

    mxchic

    7 posts

    I have a page that is placing returns before the EE channel code which will call the field data. Here is the code:

    {exp:channel:entries channel="jobop" status="cert"}
    <ul>
       <li><b>{job_title}</b>{incentive}    
    Date: {date_details}     Location: {job_location}    
    Contact Info:{contact_info}</li>
    <hr>
    </ul>
    {/exp:channel:entries}

    I want the date and location to display on the same line but it puts the info below the text Date: and Location:.  I think this is something very simple but I am scratching my head over it.

    Thanks!!

  • #2 / Oct 12, 2011 8:07pm

    Kyle Cotter

    730 posts

    Hey mxchic,

    Sorry you came across this problem. Let’s see if we can fix this up for you.

    On your {date_details} field, can you try changing the formatting to “none” on this?

    You can do this by going to “Admin -> Channel Administration -> Channel Fields -> The Group Name -> {date_details}” and setting “Default Text Formatting for This Field” to “None”.

    Hopefully this fixes you up.

    Thanks.

  • #3 / Oct 12, 2011 8:12pm

    This is actually more of a CSS issue than an ExpressionEngine issue.

    Since I’m not sure what fieldtypes you’re using for those two fields, it’s hard to be certain, but it’s likely you have the text formatting option, in the settings for your custom fields, is set to something other than none, which results in the template variable containing some additional markup. If you view the source of your rendered template you should see some additional markup inside of the paragraph tag pair.

    Setting the text formatting to none should ensure that you’re only outputting text inside the paragraph tag pair.

    All that said, you’ll probably want to do a bit more research into CSS techniques, specifically floating block elements, as this would help you make your code a bit more semantically correct.

    Hope that helps.

  • #4 / Oct 13, 2011 11:10am

    Mark Bowen

    12637 posts

    Hi mxchic,

    Just wanted to see if the advice from Kyle has helped to clear up your problem at all?

    Thanks,

    Mark

    P.S. Thanks for the help there too Jeremy.

  • #5 / Oct 13, 2011 11:49am

    mxchic

    7 posts

    That solved the problem. I know there was a simple solution!

    Thanks to everyone.

  • #6 / Oct 13, 2011 12:06pm

    Mark Bowen

    12637 posts

    Hi mxchic,

    Glad that got you sorted.

    If anything else crops up then please don’t hesitate to post again as needed.

    Cheers,

    Mark

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

ExpressionEngine News!

#eecms, #events, #releases