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.

Help with complex structure/themes

April 04, 2011 8:31am

Subscribe [2]
  • #1 / Apr 04, 2011 8:31am

    Kippi

    83 posts

    Hi,

    Im building a Property website with consists of several different projects.

    Each project consists of 8 pages:

    Front page
    Location
    Interior
    Images
    Download prospect
    About the company
    Other projects
    Contact

    I have build quite a few web projects using EE and I am comfortable with EE but
    for this project Im kind of stumped.

    The client wants to be able to choose between 3-4 different designs, for example:
    rustic, modern, classic and nature.

    I plan to make 3-4 different css files that I can activate within the template
    using if statements to altering the look of the templates but I am looking for som help
    as how to do this.

    My initial approach would be to have 1 entry for each project where all the custom fields
    reside.

    About the company and contact can be universal but I still need the possibility to skin
    these section with the relevant css styles.

    How can I best set up this type of site where by I have several projects.
    Would I need to set up seperate templates for all the different projects?

    There could be, for example 2 projects with a nature themes and 1 project with a
    classic theme.

    Really dont have a clue how I can achieve this.

    Any help would be greatly accepted.

    Thanks, Kippi

  • #2 / Apr 04, 2011 8:56am

    Brett Gullan

    70 posts

    Hi Kippi,

    If your HTML for the different “themes” doesn’t need to change, then you could simply tag the html or body element with a class and do the rest in CSS.

    For instance you could have a custom field in your Project channel (called “theme” maybe) as a dropdown select. Values would be Rustic (rustic), Modern (modern), Classic (classic) and Nature (nature). The customer can select which theme to use on a per-project basis. That value is inserted into the template:

    <html class="{theme}">

    ... and you’re good to go!

  • #3 / Apr 04, 2011 9:02am

    Brett Gullan

    70 posts

    For more complex requirements, if you need different markup for the different themes you could use the {theme} value to switch in/out different blocks of code using embedded templates.

    Alternatively, if you really need completely different markup for the different themes, maybe you do need to create separate (sets of ) templates. This could be managed using the Pages module, or Structure (which is probably better for the Client).

  • #4 / Apr 04, 2011 9:04am

    Kippi

    83 posts

    Hi Brett,
    Thanks for the reply.
    The html and the basic content/custom fields will be the same for all projects.
    I was thinking of doing something as you describe to change the css.

    My main query is how best to set up the different projects when each project needs
    to span across several templates.

    Kippi

  • #5 / Apr 04, 2011 9:16am

    Brett Gullan

    70 posts

    Hi Kippi,

    Could you just create a “project” template group, with each page as a separate template within that group. If all your project info is contained within one entry, then each template calls that entry and displays the relevant “stuff” as required.

  • #6 / Apr 04, 2011 9:20am

    Brett Gullan

    70 posts

    Continuing with the above, your URLs would look something like this:

    /project/{URL_title}
    /project/location/{URL_title}
    /project/interior/{URL_title}
    /project/images/{URL_title}

    ...

    Each project would use the same templates, the specific project being shown will depend on the URL_title (or entry Id) being used.

  • #7 / Apr 04, 2011 9:24am

    Kippi

    83 posts

    Hi Brett,
    Thanks, that could be a possibility.
    Im still a little unclear about the setup but Ill give it a go.
    If not maybe using structure is the way to go.

    Cheers, Kippi

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

ExpressionEngine News!

#eecms, #events, #releases