22847 Posts in 9589 Topics by 2802 members
|Go to End|
3 September 2012 at 7:36pm
I need to add a css class to the main #Root window of the CMS, which ideally could be custom controlled by the Page classes, but at the very least that reflects the PHP Class name that is being edited.
I have a custom php class called ArticlePage, it extends Page. I have added a custom field called YouTube Code, I want to be able to style the edit field for "YouTube Code" *just in on the ArticlePage edit pages*. So if I had a ReviewPage that also had a YouTube Code field, my css wouldn't affect it.
So in other words, if I could find a way to add a class called "ArticlePage" to the div with id "Root_Main" then I could write CSS that would achieve this.
Is this possible?
I have found the CMSTreeClasses() method on SiteTree; this is similar to what I want to do, but different. This lets me style the individual items in the Site Tree hierarchy. I want to add a class to the edit fields container itself.
|Go to Top|