Closed (works as designed)
Project:
Zen
Version:
5.x-1.1
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2008 at 19:37 UTC
Updated:
21 Feb 2009 at 17:23 UTC
The body in my site looks like:
<body class="not-front logged-in node-type-page no-sidebars page-content-register-now section-content">
page-content-register-now is the content-type+pagetitle.
As pagetitle can be changed by editors, unintentionally they might brake the theme.
Further down the page, there is a
<div class="node node-type-page" id="node-58">
that is much more accurate.
Not breaking any earlier theming, could the 'node-58' bit be added to the body-classes?
Comments
Comment #1
johnalbinActually, its not. Its "page-" + the path to the current page. In addition, the code cleans the path so that it is always a valid CSS class.
So, yes, if you change the path alias, it will change the body class. But hopefully you won't be changing the path often.
Comment #2
Keeling commentedI agree with the original post that the node ID should be added to the body classes array, because this value is unique. And a unique ID is the main point.
"Page + Path" is variable and can be changed under many scenarios. For example, "Page + Path" is not suitable to work with the Pathauto module because any change to a node's title changes its path.