The global layout.php file contains the tags for each page:
<body>
<?php echo $sf_content ?>
</body>
But for all my inner HTML pages of the site, a class is applied to the body tag:
<body class="inner-page">
<?php echo $sf_content ?>
</body>
How can I pass in a class to the layout from different templates?
in your layout.php
<body <?php if (!include_slot('body_id')): ?>id="default"<?php endif; ?>>
in your templates :
<?php slot('body_id') ?>id="bla"<?php end_slot(); ?>
or
<?php slot(
'body_id',
sprintf('id="%s"', $sf_params->get('module')))
?>