Skip to content

evoYTTabs: reference

Element types

Name in the BuilderTypeWhat it is
TabsevoyttabsContainer. Draws the navigation and the switchable content. evoAddons group.
Tabevoyttabs_itemOne tab. It is a sublayout (fragment): it accepts any Builder element.

A new Tabs comes with two Tab children, "Tab 1" and "Tab 2". Both types appear in evoMCP's element type list (yootheme_list_element_types) and can be assembled with yootheme_create_page or yootheme_add_node; evoMCP recognises sublayouts and lets you place content inside each Tab.

Properties of the evoyttabs element

ValuesPropertyDefault
tabs, pillsnav_styletabs
top, bottom, left, rightnav_positiontop
left, center, right, justifynav_alignleft
empty (none), uk-animation-fade, uk-animation-scale-up, uk-animation-scale-down, uk-animation-slide-horizontal, uk-animation-slide-verticalswitcher_animationempty
empty (off), hashurl_syncempty
empty (off), s (640 px), m (960 px)mobile_menuempty
textnav_labelempty

A value that is not in the list falls back to the factory value in the table: nothing that arrives from a form or a tool reaches the markup as it is. nav_align only applies when nav_position is top or bottom.

The evoyttabs_item element has the property title. With an empty title, the tab is called "Tab N" (N is its position, starting at 1), in English in every language.

Generated markup

PieceMarkup
Wrapperdiv.el-element
Navigation, Tabs styleul.el-nav.uk-tab with uk-tab="connect: #<id>"; with a position other than top, uk-tab-bottom, uk-tab-left or uk-tab-right is added
Navigation, Pills styleul.el-nav.uk-subnav.uk-subnav-pill with uk-switcher="connect: #<id>"; with the navigation on the left or right, also uk-flex-column
Alignment (top and bottom)uk-flex-center, uk-flex-right or uk-child-width-expand (justify)
Animationanimation: <class> is appended to the connect attribute
Contentul.el-content.uk-switcher#<id>; each tab is an li.el-item holding all its content
Left or right positionNavigation and content sit in a uk-grid (uk-width-auto@m for the navigation, uk-width-expand@m for the content)

The <id> has the form js-<unique element identifier>. Each Tabs carries its own, so several can share a page without clashing. All panels are in the HTML; UIkit hides the inactive ones.

Titles are escaped: nothing typed into a tab reaches the navigation or the menu as HTML.

Builder canvas

While you edit, panels are stacked: each div.el-item has the tab title above and its content below. This is only the editor view; the public site uses the markup above.

Tab identifier in the URL

With url_sync set to hash, each navigation link carries a data-tab attribute with its identifier:

  • It is taken from the title in lower case. Letters and digits (including accented ones and other alphabets) are kept, and any other run of characters becomes a hyphen.
  • It is cut to 60 characters, with no hyphens at either end.
  • With no title, or nothing usable in it: tab-N, where N is the position starting at 1.
  • If two tabs of the same element give the same identifier, the second gets -2, the third -3, and so on.
TitleIdentifier
Pricing and planspricing-and-plans
(empty, third tab)tab-3
Pricing, Pricingpricing, pricing-2

The evoyttabs.js script

It loads from the plugin's media folder with defer, only if some Tabs on the page has url_sync or mobile_menu turned on, and once per page. It has no dependencies, uses no cookies or storage and makes no requests.

Active tab in the URL:

  • On page load it opens the tab named by the fragment, case-insensitively. If none matches, the first one stays open.
  • When the tab changes, it writes the fragment with history.replaceState: the address changes without reloading and without adding history entries.
  • It only writes when the active tab changes. Moving focus with the arrow keys does not change the URL.
  • It listens to hashchange: an internal link or a manual change of the fragment switches tab.
  • Each Tabs reacts on its own. If two Tabs on the same page have a tab with the same identifier, both switch. Use different titles if you need to link to them separately.

Mobile menu:

  • The navigation gets uk-visible@s or uk-visible@m and the menu uk-hidden@s or uk-hidden@m: below the chosen width you see the menu; above it, the bar.
  • The menu is a button showing the active tab plus an icon, which opens a list (uk-dropdown, on click). Choosing an option opens that tab, updates the button and closes the list.
  • It works with Tabs and Pills and with all four positions.

Accessibility

  • The tab list carries aria-label: the "Navigation label" field or the plugin's translated text.
  • UIkit adds role="tablist", role="tab", aria-selected and aria-controls.
  • Keyboard: the arrow keys move focus between tabs; Enter or Space activates the focused tab. This is UIkit's behaviour.
  • The mobile menu button carries aria-haspopup="true" and, as aria-label, the same text as the navigation; the active option in the list carries aria-current.
  • Animation is "none" by default.

Plugin parameters

They are stored as parameters of the system plugin. The values none and off correspond to the empty value of the element properties.

ParameterValues
default_styletabs, pills
default_positiontop, bottom, left, right
default_alignleft, center, right, justify
default_animationnone, uk-animation-fade, uk-animation-scale-up, uk-animation-scale-down, uk-animation-slide-horizontal, uk-animation-slide-vertical
default_url_syncoff, hash
default_mobile_menuoff, s, m

evoMCP tools

If evoMCP is installed, the plugin announces itself to it with the component evoyttabs. You need management access to Joomla plugins; to change settings, edit permission as well.

PermissionToolWhat it does
Readevoyttabs_get_settingsReturns the defaults of new Tabs.
Write; needs human approval; supports dry_runevoyttabs_set_settingsChanges those values. It does not touch Tabs already on pages.
Readevoyttabs_statusStatus of the plugin and of the two element types.

Parameters of evoyttabs_set_settings (all optional; the ones you do not send stay as they are):

ParameterAllowed values
styletabs, pills
positiontop, bottom, left, right
alignleft, center, right, justify
animationnone, uk-animation-fade, uk-animation-scale-up, uk-animation-scale-down, uk-animation-slide-horizontal, uk-animation-slide-vertical
url_syncoff, hash
mobile_menuoff, s, m

A value outside the list raises an error that lists the allowed ones. With dry_run, the response shows the current state and the one that would result (would_change, with from and to) and saves nothing. Without dry_run, it returns the values now stored.

evoyttabs_status returns:

FieldContent
plugin_enabledWhether the plugin is enabled.
yootheme_installed, yootheme_versionWhether YOOtheme is present and which version.
yootheme_minimum, yootheme_okMinimum version (5.0.0) and whether it is met.
elements_ok, elementsWhether the files of the two element types are complete, with the detail for each (file, name and templates).
noteA reminder: elements are registered when YOOtheme starts; this check only verifies the files.