There is one way to let drupal know about a theme function or template. There are two ways to send variables to a template, but one of them has a lot of disadvantages.
We'll use two theme functions, with an identical template setup to illustrate these methods:
There's only one way, hook_theme()
When creating a menu [ admin/build/menu/add ] there's a field for "Menu name". We use that value to load whatever array of menu links we want. In this example, we're using "secondary-links" which comes default on most drupal installs.
<?php
$menu
= menu_navigation_links("secondary-links");
return theme('links', $menu);
?>This is a particularly nice technique to use along with hook_preprocessor_page. You can easily send your menu links to your page.tpl.php file from a module like this:
Recent comments
21 hours 31 min ago
22 hours 41 min ago
2 days 3 hours ago
3 days 13 hours ago
5 days 15 hours ago
6 days 7 hours ago
6 days 19 hours ago
6 days 19 hours ago
6 days 23 hours ago
6 days 23 hours ago