0

Im constructing a website with four 'microsites' that have roughly identical page structures. Another relevant point here is that while the content and page structures will be effectively identical, the visual aesthetic (colors, textures, type) will be substantially different.

For example, each microsite will contain:
-home
-about
-services
-etc

These pages will occur on all of the 'microsites', hence the desire to make a template that will structure all the 'about' pages. Ideally this would then grab the appropriate style/content information based on a url segment. There may instances where one microsite will contain a page that another does not.

In response to comment, for clarity
urls would occur something like this:

site.com/tour/home
site.com/tour/about
site.com/tour/services
site.com/tour/rfp

site.com/play/home
site.com/play/about
site.com/play/services
site.com/play/rfp

The vital bit to this is that the structure is identical.
The aesthetic and content are specific to each microsite and page thereof.

I would like to use the same template for each page so in the event the layout changes im only updating the 'home' template in one location rather than for each 'microsite'. Im really not sure how to best approach this using standard channel/template/entry setup.

My initial theory was to setup channels for each of the repeated pages. For example, I would have a channel dedicated to 'home' pages, a channel dedicated to 'services', etc. This would only seem to work if I was able to load channels dynamically based on url segments. I fully admit that this maybe a flawed approach that may not even work, but I can't think of a better solution.

Im totally open to any ideas (unorthodox or not). Thanks in advance.

  • Does each page have unique content in each micro site or is it the same content with just a different look? dynamically loading a channel based on url segment is easy enough but not seeing how that solves your problem. Perhaps I don't understand what you are trying to do. Can you clarify. Perhaps give example urls for the micro sites. – Phil Sep 15 '15 at 6:40
0

You could silo out different sites using the Multiple Site Manager:

https://ellislab.com/expressionengine/user-guide/cp/sites/

But depending on your amount of actual pages needed, you could just use the Structure add-on. I've found it works very well on smaller sites.

http://buildwithstructure.com

| improve this answer | |
  • Im using multiple site manager already to manage several other sites and it doesnt really suit this project well Its a single domain and a single business. It is actually a single business with four substantially different audiences/services. Im also running structure on the site right now to handle the nav. I think my problems still exists using structure also. It seems structure ties the channels to the pages. – visyoual Sep 8 '15 at 18:35
  • Have you thought about using a set of embed templates which you can reuse across all the sites? That way you can use the same codebase for each page type, then edit one and it applies everywhere? – Bluedreamer Sep 18 '15 at 19:21
0

Would you not just give your templates a body tag of class={segment_1} and craft your CSS to use the body tag to differentiate which styles are served.

So like /site_1 or /site_2 Each template would have

<body class='{segment_1}">

Then your CSS would have

.site_1 .aclass:xxxx

.site_2 .aclass: yyyy

Sorry for formatting, on mobile atm.

| improve this answer | |
0

Yes. I use a mixture of stash, switchee and native ee. all of my 'template' groups (essential for url segs) simply load in my master template with a number of prliminary variables. e.g.:

{embed="_global/.master"
    nav_channel="{segment_1}"   {!-- Channel for entries to be listed from this page/section --}
    nav_id="02"                 {!-- The navigation position of this section - css class for nav selection --}
    url_title="{last_segment}"  {!-- usually last_segment --}
    page_preset="default"       
}

then within my master I have a case by case check (switchee) on the URL then depending on the URL/URL segment I load in the template(s) for the content. So using this, depending on the URL segment you could load in a different style sheet in your head, different content segment areas in the body, and different footer, etc.

Stash is used to 'store' all my field content. this way I declare it once in my 'master' then can call it up in my templates no matter how deep my templates go, instead of having to embed and re-embed (though you may not have that problem with a small site).

Hope this helps

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.