Monday, 22 March 2010

How to create a page specificaly for a particular node type?

Suppose you have create a content type name 'calendar-event'. You have lots of content added into it.
All content will be displayed from node.tpl.php file .

But if you want to create another page for this, you just will have to create a page which name will be node-calendar-event.tpl.php

following code you have to enter into it.

/*echo "<pre>";
echo "</pre>";*/

echo $node->type;
echo "<br/>";
echo $node->title;
echo "<br/>";
echo $node->content['body']['#value'];

No comments:

Post a Comment