Hi all - essentially what I'm trying to do is force one particular node to display a certain way: by not showing any block other than "main": the block that contains the node's content. I'm linking to a pop-up window (using the grey-box module) that should display content created as a node, but not all the other blocks that make up the site.

My inclination is that this is possible using 'views,' but I'm having a hard time making it work. Is there a way to do this that doesn't require a lot of PHP coding?

Comments

ainigma32’s picture

Status: Active » Postponed (maintainer needs more info)

I believe that the easiest way to do that is to use a node-specific page template.
Suppose the particular node is located at http://example.com/node/5 you could create a copy of page.tpl.php and name it page-node-90.tpl.php Then just remove all you don't want to show and you should be good to go.

Oh, and don't forget to empty the theme cache by going to /admin/build/themes and hit save (you don't need to change anything)

Please post back how that works out for you.

- Arie

russhull’s picture

I'll give this a shot, though I'm slightly perplexed. At what level is the link between the new template and the node in question established? That is, how does the node know that it's looking at that template and not the original one? I want to create multiple nodes that will use this display; do I need to create a new template for each?

And is the naming convention for the template "page-node-##.tpl.php" where ## is the node number?

Thanks!

-Russ

ainigma32’s picture

Sorry for the delay in answering. The link between the node and the template is made automagically :-) It's called template suggestions see here http://drupal.org/node/223440 for some background info.

If you want to use multiple nodes to use that display you can create templates for each of them using the page-node-##.tpl.php format (and yes the ## is the node number) but you can also create a separate content type for these nodes and then use a single template called node-##.tpl.php where ## is the name of the node type. That way all nodes of that type are displayed using that particular template.

Please post back how that works out for you.

- Arie

ainigma32’s picture

Status: Postponed (maintainer needs more info) » Fixed

Looks like russhull won't be posting any feedback so I'm setting this to fixed.

Feel free to reopen if you think that is wrong.

- Arie

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.