LiveWhale CMS

Welcome, Guest Login

Support Center

Our documentation is moving:

Please check for the most up-to-date LiveWhale CMS and LiveWhale Calendar documentation. The below legacy documentation will remain available as a reference until the documentation migration is complete.

Dynamically Added Body Classes

Last Updated: Jun 25, 2014 01:45PM PDT

LiveWhale adds dynamic body classes for the top level directory each page is in, the group that owns it, and several possible states. While this is not sufficient for large-scale layout/design changes— use a theme in that case— it can be helpful for smaller variations in designs that share a large portion of their styles. Or, helping a design respond to specific content choices.

Using the following example page:

The body tag might look like:

<body class="plain-page images-banner_hidden body_student-groups group_comedy_shmomedy">

Here is an explanation of classes above:

This class one is coded into the page via the template, e.g. it is hard-coded.

This is added dynamically based on the state of the content on the page— in this case, the editable region images-banner also has a class “optional” on it and is currently empty, so LiveWhale appends a hidden state class to the body so that you can code to that state. Were the editable region not be empty, this would not be appended.

This is the group directory of the group that owns the page, per group=me.

This is the group that owns the page.
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found