Skip to content

Instantly share code, notes, and snippets.

@thotbox
Last active August 29, 2015 14:18
Show Gist options
  • Save thotbox/8180598d800f18c55e2a to your computer and use it in GitHub Desktop.
Save thotbox/8180598d800f18c55e2a to your computer and use it in GitHub Desktop.
ExpressionEngine Switchee Meta Template
{exp:switchee variable="{segment_1}" parse="inward"}
{!-- French --}
{case value="fr"}
{switchee variable="{segment_2}" parse="inward"}
{case value="services-famille"}
{!-- Family Services --}
{/case}
{case default="yes"}
{!-- Home --}
{/case}
{/switchee}
{/case}
{!-- English --}
{case value="family-services"}
{!-- Family Services --}
{/case}
{case value="some-section"}
{switchee variable="{segment_2}" parse="inward"}
{case value="#^P(\d+)$#|''"}
{!-- Feed/pagination --}
{/case}
{case default="yes"}
{!-- Single Entry --}
{/case}
{/switchee}
{/case}
{case default="yes"}
{!-- Home --}
{/case}
{/exp:switchee}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment