Quantcast
Viewing all articles
Browse latest Browse all 291721

How to hide a region in a content-type-specific template

html.tpl.php renders a header and footer on each page. I have a need to not render them on a particular content type, so I created node--my-custom-content-type.tpl.php.

html.tpl.php contains the following lines:

<?php print $page_top; ?>
  <?php print $page; ?>
  <?php print $page_bottom; ?>

node--my-custom-content-type.tpl.php begins with:

<?php
# hide page top and bottom so that only the page content is shown
hide(&$page_top);
hide(&$page_bottom);

which doesn't prevent the rendering of the page top and bottom. There is no render statement anywhere in node--my-custom-content-type.tpl.php.

Ditto for:

<?php
# hide page top and bottom so that only the page content is shown
hide($page_top);
hide($page_bottom);

How do I prevent these from being rendered. (I'd like to try actually getting rid of the code before I resort to css hiding.)


Viewing all articles
Browse latest Browse all 291721

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>