views:

113

answers:

1

I have a Drupal 6 site with a simple theme I'm creating called NPT. In page.tpl I have this:

<?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?>

That successfully calls this function in template.php:

npt_links()

However, I also have this in page.tpl.php:

<?php print theme('clinks', $secondary_links, array('class' => 'secondary-links')) ?>

And that does not call this function in template.php:

npt_clinks()

But it should, as I'm calling the "clinks" hook parameter in the theme() call.

Any ideas why this hook isn't being called?

+4  A: 

Have you declared the clinks theme function in the theme registry?

ceejayoz
+1 - As the naming is correct and 'clinks' sounds like a custom addition, this is the most likely cause.
Henrik Opel
Can you clarify? From that link: "PHPTemplate engine takes care of registering on behalf of the theme so in most situations you will not have to register manually."
Justin
PHPTemplate registers all the default ones, like `links`, `list_item`, etc. You've made a custom one, `clinks`, and as such PHPTemplate and Drupal have no idea it exists.
ceejayoz

related questions