Explicity rendering of views
Posted by gomezbl on March 9, 2011 at 3:11pm
Hi, I'm trying to explicity rendering at code level a view defined in my solution.
This is, suppose the name of the view is my_last_comments, and I'd like to show that view in a very specific place in my page template, say, so I'd like to get the view rendered in a preprocess variable such as:
function theme_preprocess( &$vars ) {
$vars['mylastcommentsview'] = view_render( 'my_last_comments' );
}
Got the idea?. I've looked for that in views module function but I couldn't find anything.
I'd appreciate some help in this.
Thanks
Read more