[support] Templating in Drupal 5.1 - the cleanest way to do it?

J-P Stacey jp.stacey at torchbox.com
Wed Apr 11 15:21:08 UTC 2007


Hi,

I've been fiddling with what you sent, trying to get a new menu to appear on 
the frontend, but I'm getting nowhere. My first problem is that function 
overrides just don't seem to be happening:

> As a general rule, you should use phptemplate_foo() instead of themename_foo() 
 > in most cases.  The exception is when the PHPTemplate engine itself 
already has
 > a phptemplate_foo() function in the phptemplate.engine file.

Re: the documentation at <http://drupal.org/node/29139>, I thought I'd get 
an immediate effect by writing an override for phptemplate_regions() .

My theme directory is "garlandquux" (no guesses for what that's based on!) 
so presumably the function should be called garlandquux_regions() ? So if I 
put in template.php:

	<?php
	function garlandquux_regions() {
	  return array();
	}
	?>

then shouldn't my garland-based page lose all its content? Nothing seems to 
happen when I do the above.

My second problem is that I probably won't know where to go from there: I 
want a different set of primary links to appear in admin and on the 
frontend. I have a separate menu set up, but I can't see how to bring that 
into garlandquux's templates.

Cheers,
J-P



More information about the support mailing list