Posted by GreenLanterrn on January 5, 2012 at 4:04am
Hello
I'm working on a website for an inn
I created a content type (page type) for the rooms with these fields :
Title
Body
Imagefield (possibility for the website manager to add unlimited pictures; but 4 or 5 will be enough. Two imagecache presets : thumbnail, large size for lightbox)
And a few textfields for prices, room specs (wifi, a/c, bathroom..)
Each rooms has its own page
How do I theme the pages ?
I duplicated the page.tpl.php file and renamed it to page-content_type_name.tpl.php and modified a few things but it doesn't seem to have an impact of the output
(can views help? If so, how ?)
Thank you very much !
Comments
Clear Cache
Did you clear the cache after adding the new .tpl.php file?
That's a first step. I usually put the word "test" into the new .tpl.php somewhere I'll obviously see it to make sure I'm actually seeing my new file.
Either way, you have to clear the cache once you add new .tpl.php files... that forces the system to see and then use that file instead.
Did you save the new
Did you save the new page-content_type_name.tpl.php file to your theme folder? (For some themes, you'll want to put it inside the templates subdirectory inside your theme folder.)
Are you sure you want to theme the page? Since you're working with elements of the node (title, body, imagefield, text fields), it sounds like you might want to theme the node instead. If so, you'd want to copy node.tpl.php to node-content_type_name.tpl.php (again, placed in your theme directory), and be sure to clear the cache as craigkendall mentioned.
˚ ˚ ˚ ˚ ˚
Kristi Wachter
Drupal consultant, evangelist, and enthusiast
That was the question I
That was the question I started out to ask... why he was using a page.tpl.php and if he really meant theming a whole page different from the rest of the site or just the node content (main content area) and it's fields.
Either way, I've discovered it's possible with just CSS anyways and unless you are changing the output of fields to the page I have not found too many reasons to not change the appearance of items on the pages with CSS.