Go to the source code of this file.
Tabbed module component Provides support for inline and ajax tabbing.
$vars['id'] Optional ID of the module $vars['class'] Additional classes $vars['module'] Module name Defaults to 'tabs' (.elgg-module-tabs) $vars['tabs'] An array of tabs suitable for 'navigation/tabs' view Each tab should specify either:
- a 'href' parameter to load content via AJAX, or
- a 'content' parameter to display content inline If the tab uses a 'href' attribute, it should specify whether the contents should be reloaded on a subsequent click via 'data-ajax-reload' parameter; by default, all tabs will be reloading on subsequent clicks. You can pass additional data to the ajax view via data-ajax-query attribute (json encoded string). You can also set the data-ajax-href parameter of the tab, which will override the href parameter, in case you want to ensure the tab is clickable even before the JS is bootstrapped.
[ ['text' => 'Tab 1', 'href' => '/dynamic', 'data-ajax-reload' => true], ['text' => 'Tab 2', 'href' => '/static', 'data-ajax-reload' => false], ['text' => 'Tab 3', 'href' => '/static', 'data-ajax-reload' => false, 'data-ajax-query' => json_encode($data)], ['text' => 'Tab 3', 'href' => '/page', 'data-ajax-href' => '/ajax/page'], ['text' => 'Tab 4', 'content' => 'Tab content'], ]
Definition at line 33 of file tabs.php.
if (!isset($id)) $vars['id'] = $id |