EdgeCase
EdgeCase

Reputation: 4827

Override Drupal Node Template

I want to change the layout of some nodes on my Drupal 7 site - namely to have the fields display across the page. In reading up on theming, they seem to be saying that in order to override node.tpl.php, I need to have my own them?

Is there a way of using an existing them (e.g. Bartik), but just simply overriding it for node layouts by using a custom node--mytype.tpl.php file?

Upvotes: 0

Views: 1121

Answers (2)

Sergey Litvinenko
Sergey Litvinenko

Reputation: 593

Yes, you can copy existing node.tpl.php and rename it to node--page.tpl.php. This template after clearing cache(Configuration->Performance) will be applyed to te nodes of type Page. Same thing you can do for Article node type with node--artcle.tpl.php or for any other. During manual update of the core to the new version theese files will not be replaced. But better to create a your own theme in 'sites/all/themes/' folder (Maybe child of Batric theme if needed).

Upvotes: 1

Simon
Simon

Reputation: 37978

In Drupal you can create a sub theme that extends another theme.

Upvotes: 2

Related Questions