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 manage static content in a dynamic website

February 09, 2011 1:19am

Subscribe [3]
  • #1 / Feb 09, 2011 1:19am

    Anthony Hubbard

    8 posts

    *Sorry if this posts twice, my browser hung half way through the last attempt.


    Hi All,

    I’m stuck trying to work out how to manage static content in a dynamic site.

    Basically I have a site built with 12 channels that all populate the site using the default functionality of ee - template_group/templates/entries.

    All my channels output to different pages on the site and it works amazingly well. Unfortunately, on some of the pages, there is static content usually near the top of the page. I cannot work out how to make it so my client can easily edit this static content.

    I talked to Ryan Irelan on his ee chat and he said just make a static content channel and use categories to display the entries on the relevant page. This is dodgy (channels/entries really shouldn’t be used this way), but works, and is currently the format I am using but I ran into trouble when I realised that there is no way of formatting my static entries for search - each channel needs to have a search URL that the search result goes to - using the channel this way, it is impossible (at least to my thinking).

    Is there some magical way that static content can be managed when making a dynamic site?

    Other ideas that I had involved using either snippets or global variables and allowing the client to access them to edit their content but this won’t work as I need the content to be inside a wysiwyg editor - if I could have a wysiwyg field inside a snippet / global variable then this would work.

    Any ideas?

    Thanks,

    Anthony

  • #2 / Feb 09, 2011 1:26am

    Anthony Hubbard

    8 posts

    Oh… I just realised…

    Also, the same thing could be achieved with the templates if there was some way of locking down certain parts of the template so that the client could only access their static text in the template. Sounds risky though.

    Anthony

  • #3 / Feb 09, 2011 6:04am

    captaink

    43 posts

    I would recommend you have a look at Structure

    I never build a site without it as you can seamlessly mix static pages with dynamic content and its simple for clients to manage as well.

  • #4 / Feb 09, 2011 6:44am

    Anthony Hubbard

    8 posts

    Hi Captaink,

    I was under the impression with Structure that you could have dynamic pages and static pages but not dynamic pages with static sections…

    Please prove me incorrect 😉

    Thanks for the reply,

    Anthony

  • #5 / Feb 09, 2011 6:49am

    captaink

    43 posts

    Hi Anthony,

    You can have static pages that also display dynamic content. For example if you had an events page, you could have an introductory description to your events at the top, this would be your static content and then display some event entries underneath, this would be your dynamic content.

    Is this what you’re after?

  • #6 / Feb 09, 2011 7:17am

    Anthony Hubbard

    8 posts

    That’s exactly what I’m after - thanks Captaink, I will go and check out structure.

    Cheers,

    Anthony

  • #7 / Feb 09, 2011 2:53pm

    carvingCode

    380 posts

    You could place multiple {exp:channel:entries} tags on the page.  For the static content, use the ‘entry_id’ parameter to pull in the chunk of content.  Use another or multiple {exp:channel:entries} tags to pull in other static or dynamic content.

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

ExpressionEngine News!

#eecms, #events, #releases