1
votes

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']); } 
2
You will have to create a new page.tpl.php to achieve this.Zolyboy
What is in the popup? Is it just node teasers or fields or something else in a div or is it an iframe of the node page?rooby
Also, if it is an iframe, is it valid for a user to also navigate to that page outside of the iframe?rooby
@rooby Popup comes from a view listing and contains mycustomcontenttype node.nikoskor412
So is it an iframe or not an iframe? Is the popup from custom code or from a module off drupal.org?rooby

2 Answers

1
votes

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

0
votes

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>