There are times when you need to custom theme / design your node layout.
To do so, you will need to declare your theme, and assign #theme to the content array of the node.
Example:
<?php
[modulename]_view(...) {
...
$node->content["#theme"] = "mymodule_mynode";
}
[modulename]_theme(...) {
return array(... ,
"mymodule_mynode" => array(
"template" => "mymodule-mynode",
"arguments" => array("node" => NULL)
);
?>While to render the items in the theme, you may use "drupal_render" to render the theme.
<?php |
Hope it helps those who need to know this :)