I know how to set the body class dynamically using the current page uid:
page.bodyTagCObject = HTML
page.bodyTagCObject.value.field = uid
page.bodyTagCObject.value.wrap = <body id="uid|">
But how can I set the body class using the id of the top-level ancestor of a page?
Thanks!
Check this one:
You can read about way of getting such data here:
http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.7.0/view/2/2/
Find text “getText”