Wednesday, January 28, 2009

Theme creation in Drupal 6 Modules

In Creating Custom Theme Function in drupal 6 modules You have to register the theme function in that module File

For eg if your module name is post & in that module you are using any theme function then you have to register that theme function

function post_theme() {
return array(
'post_teaser' => array(
'arguments' => array('node' => NULL, 'teaser' => FALSE, 'page' => FALSE),
),
'post_view' => array(
'arguments' => array('node' => NULL, 'teaser' => FALSE, 'page' => FALSE),
),
'post_player' => array(
'arguments' => array('node' => NULL),
),
);
}

Simply you have to add this code in your module file

Here post_view,post_player,post_teaser are some of the theme function

No comments:

Post a Comment