New Plugin: ClassEE Body
If you’ve ever classed the body of a webpage, you know how flexible it can make styling or theming different sections of a website. Classing the body also comes in handy for highlighting current pages in a site navigation.
In the past, you might have done this by hand. ClassEE Body is a new plugin from “D-Rock” on the EE forums, which automatically classes the body of your template using the segments in the URL.
In his forum post, “D-Rock” explains how the plugin works, but it’s really simple. Place {exp:classee_body} in your body tag and the plugin does the rest.
I downloaded and tested this plugin in my local sandbox of EE 1.6.7 and it works as described.
Share on Twitter
Steven Hambleton — 12:40 on 04.02.2009
What’s the difference between this and body=”{segment_1}” ?
Ryan Irelan — 14:24 on 04.02.2009
This will give you all of the segments of the URL with just one tag, plus the member group.
But, yeah, if you just need segment_1, then it’d be easier to just use the {segment_1} tag.
Derek Hogue — 16:06 on 04.02.2009
... plus, it will add “paged” if you’re in a paginated view, “monthy” if you’re viewing a monthly archive, and “category” if you’re viewing a category archive.
Just for the record.