Go to the source code of this file.
◆ $content
◆ $id
Tabbed module component Provides support for inline and ajax tabbing.
@uses $vars['id'] Optional ID of the module @uses $vars['class'] Additional classes @uses $vars['module'] Module name Defaults to 'tabs' (.elgg-module-tabs) @uses $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.
◆ $module
◆ $tabs
◆ $vars [1/2]
◆ $vars [2/2]
if (!isset( $id)) $vars[ 'id'] = $id |