At the moment, clean_body_classes() in template.php creates an edit class per node only (eg section-node-4-edit), which prevents me styling all edit pages with one statement.

I can't override it with mysubtheme_body_classes() because clean_body_classes() is called by clean_preprocess_page(), and I don't want to override that with mysubtheme_preprocess_page() just for one body class.

So, is there another way to get a 'node-edit' or 'section-node-edit' class? Do I need to unpack $variables again?

Or would you like to consider this a feature request?

CommentFileSizeAuthor
#3 860386.patch.txt590 bytessoulston
#2 860386.patch662 bytessoulston
#1 860386.patch681 bytessoulston

Comments

soulston’s picture

StatusFileSize
new681 bytes

Hi,

Added a patch to add the class of node-edit for and node/n/edit paths. I prefer to use arg's as I think it's easier to follow. Let me know if this is ok.

Thanks

soulston’s picture

StatusFileSize
new662 bytes

Hi,

Actually scrub the last patch file as I have placed the code at the start of the section so as not to interfere with the other class function.

soulston’s picture

StatusFileSize
new590 bytes

I have removed the checkplain() on this patch as it is superflous.