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.

Mini Sub Sites

March 25, 2012 10:19am

Subscribe [3]
  • #1 / Mar 25, 2012 10:19am

    Andrew Fairlie

    126 posts

    Hi EE Community!

    I’m going to be building a site in the next few weeks with something that’s new to me.

    Essentially it is one website with three target audiences, each audience will have their own tab and navigation links but otherwise would be the same site. I don’t think this warrants MSM (at least, I hope not!)

    The preferred URL structure would be:-

    http://www.domain.com/audience/template-group/template

    Is there a way that I can do this easily?

    I’m thinking a mix of categories and perhaps a Global Variable?

    I appreciate any help.

  • #2 / Mar 25, 2012 9:07pm

    Boyink!

    5011 posts

    Are we talking a one-page site?

    EE wants template group first in the URL string - unless you are running MSM out of subfolders.

    Can you do a template group per-audience and handle it with entry URL’s feeding into one template?  Or possibly one more complex template with conditionals looking at segment variables?

  • #3 / Mar 26, 2012 12:55pm

    Shane Eckert

    7174 posts

    Hey Red Carrot,

    Does Mike’s suggestion make sense?

    I think both options are good. Can you run with these?

    Cheers,

  • #4 / Mar 26, 2012 1:13pm

    Andrew Fairlie

    126 posts

    Very useful, thanks Shane and Mike.

    I’m not building this until next week - but my solution right now is something a little like this.

    Having a loader.group/index.html as the homepage acting as an abstract layer on top of the EE template system. I’ll then do the following logic to it (kinda psuedo code right now, but I think it’ll largely remain):-

    {if segment_3}
     {embed="_{segment_2}.group/{segment_3}.html" audience="{segment_1}"}
    {if:elseif segment_2}
     {embed="_{segment_2}.group/index.html" audience="{segment_1}"}
    {if:elseif segment_1}
     {embed="_home.group/index.html" audience="{segment_1}"}
    {if:else}
     {redirect='default-audience'}
    {/if}

    I’ll probably use seg2cat before passing the audience embed variable but I hope that idea helps others with a similar need.

    Thanks again guys.

  • #5 / Mar 27, 2012 7:45pm

    Sean C. Smith

    3818 posts

    Andrew,

    Good to see that Mike and Shane were able to point you in the right direction. Is there anything else I can assist you with?

    Sean

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

ExpressionEngine News!

#eecms, #events, #releases