Hiding the sitewide name and Headernav from a Single Page
Thanks in advance!
Since single_pages always need to exist at a specific path in your site, you can check for this page like so:
<?php if ($c->getCollectionPath() == '/path/to/your/single/page'): ?> <!-- do stuff here for your special single_page --> <?php else: ?> <!-- do stuff here for all the other pages --> <?php endif; ?>
Or if you have a controller you could have it pass a variable to the view with $this->set('is_special_page', true) ... then your if statement can be "if (isset($is_special_page))...".
Hope that helps!
I'm building a single page on my site that will use a different theme, a mobile version. But when I test it, the header from the normal version is appearing. I put your code in both the main theme view.php and the mobile page theme view.php (see below), but there is no change.
<?php if ($c->getCollectionPath() == '/mobile'): ?> <!-- header_remove --> <?php else: ?> <!-- header_view --> <?php endif; ?>