Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By uac_mickset on
I need to do next: some pages of Drupal site must use one template, and all other pages must use default template.
Why I need it? I'm explain: I need that at few pages don't be displayed informations like submitted by admin, add comments, votings etc... So, I want to do some pages as a simple pages. And for all other pages I need to use default template with this information (submitted, comments etc.)
How I can do it? Thx.
Comments
Depending on how far along you are
Depending on how far along you are the "simple" way is to use two content types for the different looks. So for example you might use "story" for content with the default look and "page" for the content that shows less information. Then all you need to do is copy node.tpl.php to node-page.tpl.php and edit node-page.tpl.php to remove the extra information. For things like comments and voting that add to the body they normally have a way to disable them for certain content types. For examples comments can be disabled by visiting administer -> content types and configuring the content type (in this case page). Look down the page for 'Default comment setting: ' and set to 'disabled'.
..
the PHPTemplate Theme Snippets section of the handbook may help.
Phil