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

blackarma’s picture

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.

Bairnsfather’s picture

Thanks armababy but I think maybe I was not clear enough.

To use your example, page-node-add-story.tpl.php is 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.php rather 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

vdewar’s picture

Did you get this solved?

I am also looking for something to replace the node add or to customize $content variable in page-node-add-[content type].tpl.php

Let me know if you got through with this please.

dcrocks’s picture

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