Should I create a theme or module

jdp181 - July 25, 2008 - 09:35

Hi,

newbie question, I am creating a custom menu for a site and am trying to work out the correct way to code with drupal.

The basic functionality will be to generate a list of links (menu) that will either be a list filtered by content type, or by taxonomy id. Just a simple sql call. However the menu will generated will be based on the current nid or tid.

From reading around it appears a module is the best place for the sql. And the theme is the best place to work out your current nid or tid is that the case or is it fine to obtain the nid in the module?

If its an element of both how do I pass the nid from the theme to the module?

Thanks for any help

jp

 
 

Drupal is a registered trademark of Dries Buytaert.