<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.delimiter
        {mso-style-name:delimiter;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><b>Hello Themers!<o:p></o:p></b></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b><i>How do I theme a page based on content type?</i></b> <br>
I’ve got a site with a few different custom pages and separate .tpl.php
files for their custom layouts and CSS/XHTML. The “Blog” page
is a View with a list of teasers. How do I create a custom .tpl.php file
that only targets the “page” (and layout) that the individual/full blog
entries are displayed on?<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>The Theme Developer list these as the candidate files:
<b>page-node-#.tpl.php<span class=delimiter> </span></b><span
class=delimiter><<b> </b></span><b>page-node.tpl.php<span class=delimiter> </span></b><span
class=delimiter><<b> </b></span><b>page.tpl.php. <o:p></o:p></b></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>But I don’t want to use “page.tpl.php” as
its too broad in its reach and I may decide to add other pages non-blog
pages in the future. <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I’ve tried “page-blog.tpl.php” – but
it broke my layout. I still have some unresolved CSS/XHTML issues, so I’m
wondering if “page-blog.tpl.php” is the correct naming
convention, but I just have a few bugs in my code to work out?<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><i>A second (less important) question: <o:p></o:p></i></p>
<p class=MsoNormal>Keeping track of all those .tpl.php files is getting
confusing! The Views pages are easy
(“page-blog.tpl.php” or “page-work.tpl.php”
for example), but Theme Developer is telling me that for all pages using the “page”
content type, that I have to style them by their ID
(“page-node-1.tpl.php” for the “about” page). Is
there any way to name a .tpl.php file for a page content type in a more
semantic/meaningful way? <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Such as “page-contact.tpl.php” instead of
“page-node-392.tpl.php”<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Thanks!<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b><span style='color:#404040'>brendan, fresh-off.com<o:p></o:p></span></b></p>
<p class=MsoNormal><span style='color:#404040'>Creative Direction &
Consultation: Web | Print | Brand<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#404040'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#404040'><a href="http://fresh-off.com">http://fresh-off.com</a><o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#404040'><a
href="mailto:hello@fresh-off.com">hello@fresh-off.com</a><o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#404040'>206.328.1067<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Times New Roman","serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>