Sunday, August 7, 2011

how to assign new variables available in views?


function garland_preprocess_views_view__my_view(&$variables) {
$variables['foo'] = 'some text';
}

And in the tpl file I now have a $foo variable available, as you would expect having read the preprocess function page. So in the tpl file you can do this:

No comments:

Post a Comment