0

I have a page of node type: Page with the name 'latest'. I was looking at a module that lets me arse about with the comments form and things and i was wanting to add some code just to that one page. Not change all the Page content type.

Im sure i added something to my template, a preprocess thingy to achieve this before. Im using Drupal 6. Could anyone point me in the right direction? thanks.

I'll go see if theming a node is the same but ive a feeling from past experience i have to add something. Knowing me ive probably still got the preprocess thingy in there. ill go check.

1 Answer 1

5

I believe you are looking for template suggestions, see Drupal 6 Template Suggestions, one of the Drupal provided theme suggestions will do it for you.

I think the one you are looking for is page-node-[node-id].tpl.php

Alternatively you can create your own theme suggestions, see Working with template suggestions

Edit: It depends on what you want the code to accomplish if this answer is correct or not, if it's something related to display then templates may be correct, but if it's data manipulation then you may be better off with template_preprocess_node

Alternatively if you want to execute arbitrary code not directly related to just the theming of the node, I think you would use hook_nodeapi or hook_view

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.