It is possible to choose different templates when I am creating a new node?
For example: When i want to create a node of Content Type Product, i want to choose between 4 different templates.
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.
I have two answers:
1) create a CCK field that the user will choose what template to use, (e.g. field_template), and add this snippet in your template.php:
That will then try to use node-template.tpl.php as your template file, and will fallback to node.tpl.php if it doesn’t find it.
2) create a Taxonomy for this content type, and design by the taxonomy (something like the code above, only a little modified).