[development] the better approach to split $content output on page.tpl.php file(D6)

Wang Zi Feng frank.zifeng at gmail.com
Thu Jan 14 18:05:54 UTC 2010


here is a rookie question.

I want to split $content output before it were return by page callback
function which declared by hook_menu, so that allow me to print directly
$content_top and $content_main at page.tpl.php file. Meanwhile, $content_top
and $content_main were generated by different function.

I found 2 approach to make it happen,

First one is using modulename_preprocess_page to declare variables before it
were passed to template file. It works fine.

e.g. $var['$content_top']=function_name();

Second one is that split the content into many blocks, taking the advantages
of block visibility setting option to control the appearance of regions
based on the '?q=' path.It works fine too.

Any one know better approach to solve the problem?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100115/4f5fdc88/attachment.html 

More information about the development mailing list