1

I have a custom content type "mycustomcontenttype" and i have a view listing for this Content Type. I have also a link in title for each node when clicked will open a popup shadowbox with node details. My problem is when the details comes in popup i have all the rest site layout with Header/Footer while i want to have only the node details without header footer. My template file for node named node--mycustomcontent.tpl. I want to hide or disable from this template the header and footer.

SOLVED I found a solution finally. In page.tpl.php i set an if statement like below

    if ($node->type != 'mycustomcontenttype') { print render($page['header']); } 
nikoskor412
  • 55
  • 1
  • 6

2 Answers2

1

Your template (node--mycustomcontent.tpl) actually separates template to render data in node and is called by default page.tpl.php which includes headers and footers as well.

You can easily separate page.tpl.php for your content type. In following thread you will find multiple ways to create template for your content type. https://drupal.org/node/1142800

M Arif
  • 381
  • 3
  • 10
  • I tried your suggestion and i created a page--mycustomcontent.tpl.php and i leave only this inside the source: but nothing change. – nikoskor412 May 06 '14 at 13:09
  • You have to make sure that system uses page--mycustomcontent.tpl.php Thread (https://drupal.org/node/1142800) I mentioned will help you – M Arif May 06 '14 at 14:06
0

Create a file called page—mypagename.tpl.php, and put it in your theme folder. I suggest to copy the page.tpl.php and rename it to page—mypagename.tpl.php and there you can remove the header and footer in order to not getting rendered.

This renders the footer:

<footer class="footer">
 <?php print render($page['footer']); ?>
</footer>
Zolyboy
  • 458
  • 7
  • 17