Published by Mijingo

movie icon image

EE Insider Blog

Spend your time learning and developing sites with ExpressionEngine and we'll use this blog to keep you informed of all the news related to ExpressionEngine and CodeIgniter.

» Read more in the Archives.

» Have a tip? Send us your EE news.

Learn ExpressionEngine Today

Over a series of 8 videos, watch and learn as Ryan builds an entire ExpressionEngine website from beginning to end. Get started now.

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.

Posted on Apr 02, 2009 by Ryan Irelan

Filed Under: EE Add-ons, EE Plugins

Steven Hambleton12:40 on 04.02.2009

What’s the difference between this and body=”{segment_1}” ?

Ryan Irelan14: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 Hogue16: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.  smile