Disclaimer: It's possible there is some other function that does this, but I've never seen it.
When setting up Contao for development, one of the things I like to do is add two Insert Tags to the body in the FE_PAGE template.
Code:
<body id="top" class="cur_{{env::page_alias}} par_{{env::parent_alias}} {{ua::class}} .....
So now, each page has it's own class (cur_*), as well as a class that identifies the parent (par_*).
This makes it easy to restrict a css element to a specific page or affect an entire group of child pages.
example css
Code:
body.cur_some-page .content { background: red; }
body.par_another-page .content { background: green; }
Bookmarks