Hi folks,
I'm trying to serve a specific page template for all nodes that are forum posts.
As of right now, I've been twiddling in template.php to do similar work... serve different templates based on url arg().
Here's the function I'm using: http://pastebin.com/767797
Note that I've been trying to grab the node type /(if (arg(0) == 'node' && is_numeric(arg(1)))/ and then trying to load a page template based on that: /elseif ($node->type == 'forum') {/
I thought this was the proper way to do this, yet now I'm getting some scary looking mySQL errors (linked so I don't have to paste them in here): http://qatotonetwork.newmbc.com/node/1110
Would appreciate some help if anyone has a clue what I'm doing wrong here. Thanks in advance!
-John
You are using drupal 4.6.x. Use in line 6 $node = node_load( array('nid' => arg(1)));
Regards,
Heine
Should be able to just create a new node-forum.tpl.php file and go from there.
Or switch the template_file in the $vars array, see http:// www.lullabot.com/articles/hacking_phptemplate for more details.
ted
On Jun 8, 2006, at 3:39 PM, John Haas wrote:
I'm trying to serve a specific page template for all nodes that are forum posts.