<HTML>
<HEAD>
<TITLE>Re: [support] Overriding page.tpl.php for node type...</TITLE>
</HEAD>
<BODY>
<FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I&#8217;m not sure I understand your question? &nbsp;I&#8217;m not using path auto or views. &nbsp;I&#8217;m just typing in the URL:<BR>
<BR>
<a href="http://localhost/type">http://localhost/type</a><BR>
<BR>
And looking to access the page<BR>
<BR>
Page-type.tpl.php<BR>
<BR>
<BR>
On 4/10/09 9:13 AM, &quot;Steve Kessler&quot; &lt;skessler@denverdataman.com&gt; wrote:<BR>
<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>The page you are trying to create what is creating the URL. Does the URL come from Pathautor or Views?<BR>
&nbsp;<BR>
Thanks,<BR>
Steve<BR>
&nbsp;<BR>
<BR>
Steve Kessler <BR>
<B>Denver DataMan <BR>
</B>303-587-4428 <BR>
<FONT COLOR="#0000FF">Sign up for the Denver DataMan Free eNewsletter</FONT> <a href="http://www.denverdataman.com/content/enewsletter-signup">&lt;http://www.denverdataman.com/content/enewsletter-signup&gt;</a> <BR>
&nbsp;<BR>
<BR>
</SPAN><SPAN STYLE='font-size:10pt'><B>From:</B> Scott Matthews [<a href="mailto:smatthews@optaros.com]">mailto:smatthews@optaros.com]</a> <BR>
<B>Sent:</B> Friday, April 10, 2009 6:53 AM<BR>
<B>To:</B> support@drupal.org<BR>
<B>Subject:</B> [support] Overriding page.tpl.php for node type...<BR>
</SPAN></FONT></FONT><FONT SIZE="5"><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT></FONT><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>This should be a simple question and answer...<BR>
<BR>
I know that a basic premise of Drupals theme hierarchy should be that if I want a page for a specific node I make a file page-[<I>type</I>].tpl.php. &nbsp;I have done this and I still get a &#8220;Page not found&#8221; issue. &nbsp;Creating a node-[type].tpl.php works for overriding the node template for the specific node type.<BR>
<BR>
Does anyone have any suggestions for what might be missing from the out of the box Drupal solution to get this working?<BR>
<BR>
I&#8217;ve tried adding the following function to my template.php which I found on a forum post previously but with no success:<BR>
<BR>
function _phptemplate_variables($hook, $vars) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;if ($hook == 'page' &amp;&amp; isset($vars['node'])) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$vars['template_files'][] = 'page-'.str_replace('_', '-', $vars['node']-&gt;type);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;return $vars;<BR>
}</SPAN></FONT></FONT><FONT SIZE="5"><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT></FONT><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></FONT></BLOCKQUOTE>
</BODY>
</HTML>