Repository navigation
Sub Tabs
Tabs are created implicitly by the tab_id you pass to any setting registration. cmm_register_subtab nests one of those tabs under another, so the menu draws a second tab row beneath the main one.
cmm_example_register_mod = {
cmm_register_subtab = {
mod_id = cmm_example
tab_id = ordered
parent_tab_id = lists
}
cmm_register_settings_list = {
mod_id = cmm_example
setting_id = example_list
tab_id = ordered
item_count = 5
is_ordered = 1
}
}
lists appears in the main tab row and ordered in the sub-tab row below it. Both tabs are registered by the call, so lists needs no registration of its own.
A tab with sub-tabs is a container: clicking it selects the sub-tab you last had open under it, or its first sub-tab if you have not opened one, and settings registered directly on it do not appear. Nesting goes one level deep, so a sub-tab cannot have sub-tabs of its own.
Sub-tab order follows the order the cmm_register_subtab calls run in. The parent's position in the main row follows wherever it is first registered, so putting its cmm_register_subtab calls where you want the tab to appear places it there.
A sub-tab uses the same key format as any other tab:
l_english:
cmm_example__lists_name: "Lists" # Parent tab
cmm_example__ordered_name: "Ordered" # Sub-tabGroup keys include the owning tab, so a group under a sub-tab is keyed to the sub-tab:
l_english:
cmm_example__ordered__example_list_name: "Ordered Settings List"See Localization for the full key reference.