[support] D7 Adding content to an empty region from template.php

Benj Fredrick benj.fredrick at gmail.com
Fri Jun 1 14:53:33 UTC 2012


I don't know that it's the Right Way or the Best Way, but I have used
template_preprocess_region() to add content to an empty region from
template.php.

hope that helps,
-Benj


On Thu, May 31, 2012 at 5:54 PM, Jeff Greenberg <
listmail.ayendesigns at gmail.com> wrote:

> I was asking a slightly different question in the themes list, but I've
> narrowed down my issue, and believe it's more of a support question than a
> theme development question.
>
> I am trying to add content to a region from within template.php. The
> region has no content prior to doing this.
>
> I have tried drupal_add_region_content() from template_preprocess_page,
> template_preprocess_html and template_preprocess_region.
>
> I've also tried just making an assignment to
> $vars[page][my_region][my_section_name][content][#markup] from the same
> functions.
>
> Nothing results in output. Do I have to do it using hook_page_build from a
> module?
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20120601/f84b4a4e/attachment.html 


More information about the support mailing list