Skip to content

Instantly share code, notes, and snippets.

@erikreagan
Created October 5, 2009 12:59
Show Gist options
  • Save erikreagan/202101 to your computer and use it in GitHub Desktop.
Save erikreagan/202101 to your computer and use it in GitHub Desktop.
ExpressionEngine Body Tags
<!-- A few samples of body tag use in ExpressionEngine templates -->
<!-- This uses embedded variables if they are sent from another template. I use this one often -->
<body{if embed:body_id} id="{embed:body_id}"{/if}{if embed:body_class} class="{embed:body_class}"{/if}>
<!-- This works well when sticking to the template_group/template structure -->
<body{if segment_1 !=''} id="{segment_1}"{if segment_2 != ''} class="{segment_2}"{/if}{/if}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment