Custom page.tpl.php
| Project: | Dreamy |
| Version: | 6.x-1.4 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | template.php page.tpl.php content type custom template |
Jump to:
I'm trying to write a custom page.tpl.php for a site I am doing (well, copy and cludge, not write - PHP is beyond me at this stage... :)
I've got a content type called Accommodation Listing (machine readable name accommodation_listing). I've copied the page.tpl.php to page-accommodation_listing.php and done a simple proof-of-concept change to it (added some text beside the breadcrumb code), and tested it works on the main page.tpl.php... which it does - the text appears.
What I can't seem to get to happen is for the accommodation_listing template to do anything. I'm sure I have done this before with the block.tpl.php on another site I designed (using a different theme), and the reading I have done has lead me to believe I may need a template.php file (the theme doesn't seem to have one - should I create one? What should it have in it if thats the case?)
Anyway, thats the problem - does anyone have a solution for it - is it a theme issue? (I like this theme, I'm modifying it quite a bit, but the basic layout is exactly what I am looking for)... or should I be looking for an answer somewhere else?
Cheers in Advance
Steve

#1
Never mind... using a different theme that I have made to look the way I want - its allowing me to make the changes I need. Thanks anyway.
Steve
#2
Hi,
You have to create node-accommodation_listing.tpl.php rather than page-accommodation_listing.tpl.php.
Hope it will work for you.