I added below code to a hook, run from header_head.
Code:
<script type="text/javascript">
$(document).ready(function() {
$('body').addClass('pagetemplate-', pageData['pagetemplateid']);
});
</script>
This results in an browser console error: "
Cant find variable $". I tried to enclose everything in
(function($)), which led to no more error. With that though, the pagetemplateID never made it into page source.
What does work is amending
header template, line 146 as below:
Code:
<body id="vb-page-body" class="l-desktop page{vb:var page.pageid} vb-page view-mode{vb:raw isLoggedout}{vb:var state} pagetemplateid{vb:var page.pagetemplateid}" {vb:schema {vb:raw bodySchema}} {vb:raw group_data_attr}>