I have two isdues doing that. If I print from the preprocess or process function, the image appears but its html appears before the section tag for that region instead of inside it.
Also, if I add the themed image variable to $vars, it isn't available in the page template.
Sent from my iPhone
On May 28, 2012, at 1:04 PM, Carl Wiedemann carl.wiedemann@gmail.com wrote:
Render arrays are very specific, so you'd likely have to add it via $page['some_key']['#markup'] => $output;
I'd recommend doing these things in the preprocess function, not the process function. Preprocess is generally better understood and has more historic precedence.
Unless you have an explicit reason to use render(), I don't see any harm in creating your own variables in the preprocessor and printing them directly.
Carl Wiedemann Website design & development consulting | c4rl.ws carl.wiedemann@gmail.com | skype: c4rlww
On Mon, May 28, 2012 at 10:46 AM, Jeff Greenberg listmail.ayendesigns@gmail.com wrote: I am displaying a large image in a front-page region. Currently I hook process_region in template.php, set a variable = theme('image'), and print it.
I'm thinking that rather than printing it from the hook, I'd rather add it to $page[my_region_name] and let it get printed when the template prints render[my_region_name].
Where do I add it, or what do I call to add it? I tried doing things in the hook like $vars[page][my_region_name][content][] = $my_themed_image, but that doesn't work.
themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes
themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes