How add vars to elgg_extends_view?

I don't know how to add vars to extends_view.

Sorry, my english is bad.

  • 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.

Performance and Scalability

Performance and Scalability

If you've got a need for speed, this group is for you.