pyrocms/pyrocms — pull request #1999 by RickHolmes (2012-11-11 14:30:15+00:00)
Title: Feature/page

This feature adds the ability to set the

id and/or class attributes, which I've used for years for both page-specific css and JavaScript file loading. Setting these attributes is difficult at best in most cms applications.

{{ theme:body_id }} is used to get the body id (set on page's "design" tab). This will default to "home" or the last segment of the url if not set but plugin used.

{{ theme:body_class }} does the same for the class attribute, which may be set in either the page's "design" tab or the page-layout's "css" tab or both (concatenated) and will default to "page" if nothing is set. For "blog" pages, which have no screens available to set a class, it will use "blog" plus either "category" with the category slug, "archive" or "single". It will use "faq" if the faq addon module is used.

Changed files should only be found in the pages module and plugins/theme.php.