This itty bitty patch allows you to create tpl pages by node type to allow easier node themeing. For example, to make a custom theme file for story nodes you would create a node.story.tpl.php file. Super handy.

Thanks!

CommentFileSizeAuthor
#1 phptemplate_2.patch903 bytescrunchywelch

Comments

crunchywelch’s picture

StatusFileSize
new903 bytes

In fact, it is actually this patch which does this.

menesis’s picture

How is this different from how phptemplate does that already? Except node.story.tpl.php vs. node-story.tpl.php

adrian’s picture

Yeah.

There is a file parameter for phptemplate_callback, that is a 'suggested file'.. it falls back on the default hook.tpl.php (either in the theme dir, or in themes/engines/phptemplate) by default.

factoryjoe’s picture

Wait, this already exists? Sweet moses, finally!

Now the next thing that you tell me is that these files are created ad-hoc by the CCK system and you can edit them via the Drupal admin UI.

...

...wait, what's that? Can you speak up a little? I can't hear...

Oh. Not there yet...

Um. Ok, thanks.

So Adrian, is this documented somewhere? I hadn't seen that functionality before -- but I was looking forward to it!

adrian’s picture

The announcement was posted here : http://drupal.org/node/18347