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.

About formatting

October 10, 2008 7:20am

Subscribe [2]
  • #1 / Oct 10, 2008 7:20am

    kriz

    231 posts

    In your html do you do:

    {article_content}

    or

    <div class=“content”>{article_content}</div>

    The difference being, the first one is already wrapped with elements.

    However, the second method needs the user to put some content here when publishing a new page. And this is assuming that whoever is publishing, knows basic html.

    Im thinking of going with the second method, since <blockquote> cant be inside

    How do you go about this?

  • #2 / Oct 10, 2008 7:49am

    Mark Bowen

    12637 posts

    Hi Kriz,

    This really all depends on two things. How you are designing your page and what settings you have for your custom field holding the article content.

    What I always suggest is designing your site templates outside of ExpressionEngine first and getting everything to look fine in that way in a browser. You can then move this all across to ExpressionEngine and will know automatically whether you need to use XHTML, Auto
    or None as your field setting.

    Myself I have used both methods and even other methods such as if you have a div which has a class then you can style the paragraph text within it without needing to give it a class just by saying :

    .content p {
            font-size: 1.5em;
    }

    Hope that helps a bit.

    Best wishes,

    Mark

  • #3 / Oct 10, 2008 7:54am

    kriz

    231 posts

    Hi Mark,

    What im trying to do is something like:

    "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
    
    "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
    
    <blockquote>Our articles are updated daily and we a comments section for users, like you, to contribute their thoughts.</blockquote>
    
    "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

    This text block would normally go inside one custom field (article_content)

    If I do {article_content}, this wont validate correctly since <blockquote> is inside

  • #4 / Oct 10, 2008 8:09am

    Mark Bowen

    12637 posts

    You could perhaps use this instead :

    
    "Lorem ipsum dolor sit amet, consectetur adipisicing elit"
    <span class="blockquote">Our articles are…</span>
    

    and then use CSS to style your blockquotes instead.

    Don’t know if that would work for you or not?

    Best wishes,

    Mark

  • #5 / Oct 10, 2008 8:21am

    kriz

    231 posts

    Mark, have you used TinyMCE or similar with EE? Perhaps this could also be a good solution?

  • #6 / Oct 10, 2008 8:27am

    Mark Bowen

    12637 posts

    Mark, have you used TinyMCE or similar with EE? Perhaps this could also be a good solution?

    I never ever use them just for the simple fact that I like to do everything myself and can’t stand the quality of the output that those types of editors provide. I’ve never really found one that outputs really solid html. Not to say that there isn’t one now though as I gave up a long time ago 😉

    I just prefer to type it in myself so I know that everything is perfect.

    Best wishes,

    Mark

  • #7 / Oct 10, 2008 9:00am

    kriz

    231 posts

    Ah, got it. Will just use XHTML formatting instead. Thanks for the tip Mark

  • #8 / Oct 10, 2008 9:24am

    Mark Bowen

    12637 posts

    No problem.

    Hope it all goes well for you.

    Best wishes,

    Mark

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

ExpressionEngine News!

#eecms, #events, #releases