I don't know how to add vars to extends_view.
Sorry, my english is bad.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Matt Beckett@Beck24

Matt Beckett - 0 likes
- thoigian15@thoigian15

thoigian15 - 0 likes
You must log in to post replies.When you extend a view the extension gets passed the same $vars as the view itself. So whatever is available in the view is available in your extension.
If you're asking how to pass variables into a view, that happens when you call elgg_view, $vars is an array of data that you pass into the function, and core system adds some additional data automatically.
eg.
$options = array('entity' => $my_entity);
echo elgg_view('my/view', $options);
Now when the view 'my/view' and any of its extensions are rendered they can have access to $my_entity by accessing $vars['entity']
I want send vars to exends_view.
example:
I have view elgg_view('my/metatags', array('data'=>$data))
I want exends with view head. elgg_exends_view('page/elements/head', 'my/metatags');
I don't know how add $data to my/metatags and exends view head.