[development] the better approach to split $content output on page.tpl.php file(D6)
Sven Decabooter
sdecabooter at gmail.com
Tue Jan 19 08:41:47 UTC 2010
I think the first approach will be easiest to manage.. You don't have the
block system overhead and possible problems with the visibility settings.
But as you say, both approaches are probably fine.
2010/1/14 Wang Zi Feng <frank.zifeng at gmail.com>
> hi,
>
> 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?
>
> Thanks
>
> Wang
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100119/5ee8d7ce/attachment.html
More information about the development
mailing list