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.

Best practice question regarding arguments to templates

July 14, 2011 10:56pm

Subscribe [2]
  • #1 / Jul 14, 2011 10:56pm

    stevepurcell

    5 posts

    Greetings ... I have an app that I am putting together, I have a basic template that will be used on all of my pages.  The only thing that will change will be the center column of the 3 column template.  Rather than have 15 different templates, I would like to have one main template and then have it pull in the center column from other embeds.

    What are some of the options for doing this?

    Thanks
    Steve

  • #2 / Jul 27, 2011 5:15pm

    lebisol

    2234 posts

    You can condition when to call your embeds by checking on segments
    eg.
    when viewing
    http://site.com/index.php/blog/post/hello-world

    {if segment_1 ="blog"}
    show embed x
    {/if}
    {if segment_1 !=""}
    hey something is in segment 3 so we must be reading a an entry so here is embed y
    {/if}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases