By Bairnsfather on
The excellent pages here http://drupal.org/node/190815 and here http://drupal.org/node/139766 and other places in the theming handbook helped me learn how to customize my /node/add page by creating "page-node-add.tpl.php" however, I only want to override that one page, not all the node creation pages.
I tried duplicating
page-node-add.tpl.php to
page-node-add-.tpl.php, but no success. I also tried variations, perhaps two dashes, maybe underscores… :-)
How can I tell Drupal to "go back" to the original page.tpl.php? Or put another tpl.php file in the path instead of having to create new tpl.php files for each content type?
Comments
You can make only specific
You can make specific page templates for example if you want to make template for node/add/story then template would be
ppage-node-add-story.tpl.php.You should install Devel modules wich is awsome for exactly stuff you are looking for.
If you would like to revert your templates to default ones simply remove your custom templates and drupal will start using default ones again.
Thanks, but how do I stop the cascade?
Thanks armababy but I think maybe I was not clear enough.
To use your example,
page-node-add-story.tpl.phpis an "end point," nothing inherits past it.But when I created a template for node/add, that template cascaded to affect all the downstream content type creation pages, as you point out, the story type, the page type, etc…
Basically I have a decent amount of text to insert and thought it would be faster to have httpd serve it via
page-node-add.tpl.phprather than using the database. However, I am considering using a block instead.But in the mean time, I think it would be good for me to learn how to stop a tpl.php file from cascading. Can you tell me?
TIA
Did you get this solved? I am
Did you get this solved?
I am also looking for something to replace the node add or to customize
$contentvariable inpage-node-add-[content type].tpl.phpLet me know if you got through with this please.
The cascade is from the more
The cascade is from the more specific to the more general, so node stops the cascade. As you point out it cascades form node-add-(a particular content type) to node-add-(any content type) to node-(do whatever). It doesn't seem the right way to do what you want. You can create another content type, or a block, which I think is just a different type of content.
David Rocks