[support] Views help

Carl Wiedemann carl.wiedemann at gmail.com
Tue Mar 22 22:37:49 UTC 2011


Use a theme preprocess function in your theme's template.php file.

function mytheme_views_view_table__viewname__atachment_1(&$vars) { ... }

This will give you access to every template variable in a reference-passed
array, which should have the view and row objects.

After you add the function to template.php, clearing cache resets the theme
registry which is necessary for the preprocess function to execute. Use
devel module's dpm() function to inspect the values.

For more information about preprocessors, see the handbook
http://drupal.org/node/223430 or check out my session at DrupalCon
Copenhagen
http://www.archive.org/details/ThemePreprocessFunctionsAnIntroduction_383



On Tue, Mar 22, 2011 at 4:15 PM, Joel Willers <joel.willers at sigler.com>wrote:

> In views-view-table—viewname—atachment-1.tpl.php I can access $rows and get
> a nice array view that I can play with.  I can also get $footer, which I can
> also play around with.  Is there a way using views_get_view to get those
> nice arrays?  -> execute didn’t give me what I wanted, so might there be
> another function I might get more what I’m looking for?
>
>
>
> Joel
>
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110322/0a93f2a2/attachment.html 


More information about the support mailing list