Is there a way to set a custom content type page to a custom node concept via the template files? I.e. posting an event, but I want the event page to have some exclusive custom modules + css outside of the standard node template.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To use a different template for a node type (that still sits in the content area of your themes
page.tpl.phpfile), just get the machine name of your content type and copy the node.tpl.php file fromroot/modules/nodetoyour_theme/templates/and rename itnode--MACHINE_NAME.tpl.php. Clear your cache and it will start being picked up by Drupal.To reformat an entire page is quite similar. Copy
root/modules/system/page.tpl.phpto youryour_theme/templates/and rename it topage--MACHINE_NAME.tpl.php. Clear your cache and you’re ready to go.You can style individual nodes by using the node template method above but replacing the machine name with your node nid.