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.

create a simple trigger to alternate templates off of ?

July 14, 2009 2:52am

Subscribe [2]
  • #1 / Jul 14, 2009 2:52am

    brainwave

    19 posts

    I’ve got a site that sees specific, unpredictable, surges in traffic. Server-killing surges.

    We need a quick way of switching the high-traffic pages into “light” versions of the templates, fewer db queries, etc.

    I was hoping to do this with global user defined variables, something like this:

    {if site_mode == normal}  {embed="site/index-normal"} {/if}
    
    {if site_mode == busy}  {embed="site/index-busy"}{/if}

    ...but I’ve now learned that such global variables don’t work with conditionals.

    Can anyone recommend a different approach? Keep in mind, the reason we wanted to try global variables is because it’s a simple, consistent thing, where a non-tech-savvy person could navigate to, and simply change a simple word from one thing to another.

  • #2 / Jul 14, 2009 9:34pm

    OrganizedFellow

    435 posts

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

ExpressionEngine News!

#eecms, #events, #releases