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.

how to handle static page content

November 28, 2011 10:42am

Subscribe [4]
  • #1 / Nov 28, 2011 10:42am

    coriordan

    7 posts

    Hi,

    Is there a generally perscribed way of handling static page content within ExpressionEngine?

    For example, I have some welcome text on an index page that I don’t expect to change very often. However, I’d like to make it possible for my client to edit the content in this region if necessary. What’s the best way to handle content like this? Seperate channels to hold content for these regions? Snippets or something else?

    thanks,
    Cathal.

  • #2 / Nov 28, 2011 2:07pm

    John St-Amand

    865 posts

    In that specific case, I can tell you that I normally create a channel for that kind of content - so a channel like “Home Welcome”.  I prefer to do it that way since it allows the client to either edit the existing entry, or just post a new one, keeping the older one in the system for resurrection later if desired (giving them the ability to A/B text their welcome message content internally, for example).  How you choose to pull the entries from that channel into the home page partly depends on a few key things.  In my case, I normally treat the “home welcome” channel as the chief content of the home page - as such, a meta description, alternate title, and meta keywords are part of that channel, and I put that content dynamically into the page header.  As a result, the channel entries tag pair for that channel tends to be the main one in my home page template, and any other content appearing from other channels on the home page tends to be drawn in using snippets.

    There are many ways to do the same thing in EE, so this is just one example of how I commonly approach what you asked about.  Hope it helps.

  • #3 / Nov 28, 2011 3:15pm

    coriordan

    7 posts

    @John St-Amand, thanks for the reply. Yeah, the way you describe looks like a good way to go. How do you match up the entries in your channel to sections on the home page? By title or some other means?

    Cathal.

  • #4 / Nov 28, 2011 3:33pm

    John St-Amand

    865 posts

    I’m not completely sure I understand what you mean.  In my case, I simply have a channel entries tag pair within the home template, with a limit of 1 and ordering by date, descending order (don’t forget dynamic=“no”), to load the most recent home welcome entry into the page.  Nothing to match up under those circumstances.

  • #5 / Apr 11, 2012 4:20am

    Marc L

    20 posts

    Im on my first EE project and am researching how best to have simple static content as well -  I cant help but think that this general solution is going to be really confusing for the client/content admin. (its confusing enough for me…)

    As per coriordan’s example if there is one welcome message on the home page, should it not make sense for there to be just one place in the CP where the client can change this. Publishing entries feels like a bad paradigm for editing one specific area of content in a site.

    Is there a more intuitive way to set this is up ? At the very worst is it possible to prevent the client from adding further entries but just be able to edit a single one ?

  • #6 / Apr 12, 2012 5:59am

    John St-Amand

    865 posts

    Variables are commonly used for one-off content items that don’t have a need to be in a channel.  The downside is that EE’s native global variables are only accessible in the templates area - which you would likely want to keep clients away from.  A really solid alternative is Low Variables, which adds huge functionality to the variables concept (they are capable of being snippets too) while providing access outside the templates menu in the CP.

    Another consideration for you though - you could easily still handle something like a welcome message in a channel - whether it’s the client editing the existing entry or the client adding a new one - if you’re only drawing the most recent addition to the channel onto the home page, the front end experience is unaffected.  It may seem like overkill, but that’s one instance where I might not think of it as static content.  If in a channel, you can effectively maintain a history of those welcome messages.  And in so doing, a client could have a series of welcome messages that they can enable/disable, measuring the success of each one distinctly.  Or if the welcome message is customized to match the season, for example, then when winter rolls around the following year, they could either post another new one or simply re-enable the one they wrote for the previous year.  So even approaching it as a channel can give you some interesting possibilities for your client.

    Hope this helps.

  • #7 / Apr 12, 2012 9:22am

    jtrascap

    161 posts

    I use a method much like John’s - create a static channel and allow individual entries: About Us, Route, Privacy, etc. Then I use the Pages module in each static page to give me the direct access to the content, without having to do much more. “/about” renders the correct content in that static channel.. simple.

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

ExpressionEngine News!

#eecms, #events, #releases