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.

HTML in Entries

August 12, 2007 11:34pm

Subscribe [4]
  • #1 / Aug 12, 2007 11:34pm

    jschutt

    452 posts

    I am continuing to work on a site that is puzzling me.  What I have currently done is set up templates for the majority of my pages.  Before you tell me that I should be using entries, please take a look and advise me on how to put in the required content. 

    This is not a site that lends itself to repeating content like a blog.  Many of the pages have nothing similar to any of the other pages.  Should I create a custom field that would hold all of the content, html and all?

    If I were to use the new integrated pages module, dealing with the navigation would be another whole deal as well!

    I am definitely open to suggestions.

  • #2 / Aug 14, 2007 4:02pm

    e-man

    1816 posts

    There’s certainly nothing stopping you from putting content in your templates, and you can put HTML into weblog entries (just set formatting to none).
    You can even do both, or use the Pages module or a combination thereof 😊
    The one advantage I see to putting content into entries is that it’s available for the search functionality.
    That’s a great looking site BTW!

  • #3 / Aug 14, 2007 7:00pm

    jschutt

    452 posts

    Thanks for the response. 

    I have had quite a time trying to figure out how to implement what EE is really designed to do, with the content that I am required to present.  Even if I called a specific entry, wouldn’t that still require just as many templates as if I hardcoded (which I did)?

  • #4 / Aug 15, 2007 2:28am

    Magnus Wester

    38 posts

    I use a custom status called “Static”. Static entries only show up if I link to them from another page. Essentially, they form stand-alone web pages that can contain HTML, available at domain.com/language/index/tgroup/tname/title/. Most of these pages are rendered through the same template, but I do have specialty templates for things like the Contact page.

    Would this kind of setup simplify your work?

  • #5 / Aug 15, 2007 9:36am

    jschutt

    452 posts

    I probably should know this, but how do you specify that they will only show up if linked to?

  • #6 / Aug 15, 2007 9:44am

    Sue Crocker

    26054 posts

    Well, if you have a weblog entry that has a custom status such as “static” then those entries won’t show up in a regular exp:weblog:entries list.

    Otherwise, you just set the link to go to a single entry template where the static status can also be shown.

  • #7 / Aug 15, 2007 10:13am

    jschutt

    452 posts

    I will have to do some reading up on custom entry statii (I think that is the plural of status :cheese:)

  • #8 / Aug 15, 2007 10:22am

    Magnus Wester

    38 posts

    I probably should know this, but how do you specify that they will only show up if linked to?

    Well, there’s no setting for that, it was more a figure of speech. What I mean is that as long as you give an entry a status that does not by default show up on an index (multi-entry) page, there is no way that a user can navigate to the entry unless you provide an explicit link to it in another entry, a tab, a sidebar or some other navigation tool.

    As Sue says, if you decide to use a custom status, you must add a “status” parameter to the exp:weblog:entries tag in the single-entry template, e.g.

    {exp:weblog:entries status="open|static"
  • #9 / Aug 15, 2007 10:59am

    e-man

    1816 posts

    J, have a look at this small site I did in EE core a while back.
    The entire site only has 1 template and 1 weblog for all the pages except the news page and all content is in weblog entries.
    The basic EE code is no more than this:

    {exp:weblog:entries weblog="{my_weblog}"  limit="1"}
    {exp:allow_eecode}
    {body}
    {/exp:allow_eecode}
    {/exp:weblog:entries}

    + a few embeds for footer, nav etc…
    The allow_eecode just lets you embed ee tags in a webpost, thats’s all.
    Hope this helps!

  • #10 / Aug 15, 2007 11:12am

    jschutt

    452 posts

    e-man - so, if I’m understanding this correctly… You have just one weblog for all of the content.  You obviously must be using html in the entries.  I know that we can use code within our entries but is that the way we are supposed to do it?  I have always thought that it is supposed to be straight text in the custom fields. 

    How does putting code within the entries affect the search functionality?

    Magnus - Thanks for the thoughts on custom entry status.  If you look at the site that I am working on, the navigation both on the top bar as well as the side bar changes for the different sections.  Is there a way that I can specify which side bar and top bar should load based on the entry?

    Thanks all for the help…!

  • #11 / Aug 15, 2007 11:27am

    e-man

    1816 posts

    e-man - so, if I’m understanding this correctly… You have just one weblog for all of the content.

    Correct.

    You obviously must be using html in the entries.

    Again, correct.

      I know that we can use code within our entries but is that the way we are supposed to do it?  I have always thought that it is supposed to be straight text in the custom fields.

    There is no “supposed way” 😊
    You can have html in there, unformatted text, on occasion it’s markdown or textile. It all depends.


    How does putting code within the entries affect the search functionality?

    Try and do a search, it works fine.

    Magnus - Thanks for the thoughts on custom entry status.  If you look at the site Is there a way that I can specify which side bar and top bar should load based on the entry?

    Have a look at using embed variables

  • #12 / Aug 15, 2007 11:37am

    Magnus Wester

    38 posts

    Is there a way that I can specify which side bar and top bar should load based on the entry?

    There are several way to do this:

    - Use separate templates for each side/top bar combination and just render each page through the right template (great if there aren’t too many top/sidebar combinations)

    - Create a custom weblog field for the side bar and the top bar, respectively. Place an EE embed tag in each field, that embeds the correct side bar/top bar for each entry. Then use allow_eecode around each of these fields (as in e-mans example) to embed the correct sidebars for each page (“allow_eecode” is a plug-in that needs to be installed separately)

    - Place the sidebar code in a custom field for each entry (unless each entry truly needs it’s own unique sidebar, this will be difficult to manage)

    From a user perspective I believe you should be careful changing the side bar and top bar in a way that is not extremely obvious to the user. Otherwise they will start looking for things - “I know I saw it on the previous page, but it’s not on this one” - and instead of thinking about you as the very clever designer you are, they will think of you as someone that made them lose face. And you don’t want that to happen.

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

ExpressionEngine News!

#eecms, #events, #releases