Tabs - Creating and Updating them

Currently there are two fandom extensions for creating Tabs in a document.

Tabview and Tabber, but Tabview will not be available on the new platform. It will probably be a long time before this wiki is migrated over to the new platform, but to keep from having any unexpected surprises, we are no longer going to permit new Tabview code being added to this site. In the meantime we will be changing all existing Tabview over to Tabber, option 2.

## Tabview

Tabview pulls in a seperate page to the main page and displays is as part of the original article.  The pages should be structured like this and all assigned to the same category so they are easy to find.

* Main Article
* Main Article/subpage tab 1
* Main Article/subpage tab 2

You can create as many subpages as you need to break up long info dumps on a single article and to make it more user friendly.

You can not edit the subpages from the Main article without adding specific code to the subpage.

### Issues

#### New Unified Community Platform

This feature is not currently available on wikis which use the new Unified Community Platform (UCP). There has been no word if they will eventually add it to the UCO so for those wikis that use Tabview, when they are migrated to the new platform, their pages will break. See Tabber, Option 2 to emulate Tabview.

#### Mobile experience

On mobile devices, the indicated pages are shown as a list of links rather than as tabs. This is because tabbed experiences are difficult to operate on mobile devices.

#### View/edit tab content

Tab view does not provide a simple way to view/edit the original page. Since the tab is actually a link element, a user could right click it and click open to manually follow the link.

## Tabber

There are multiple ways to use Tabber on a page.

### Option 1

This is the simplest and most common usage of Tabber.

* Open an article for editing and switch to Source mode.
* Copy and paste the following code into your editor.

```
<tabber>First Tab Title=First tab sample text.
</tabber>

```

* Click "Preview" to see that the code produced these tabs:

* First Tab Title
* Second Tab Title
* Third Tab Title
First tab sample text.

Second tab content goes here.

Third tab content goes here.

* Click "Back" to return to editing.
* Edit your tabs by replacing the text of the titles and content with your community's content. **For example**, replace "First Tab Title" with "Characters," and replace the sample text with descriptions and images of your favorite characters. You can also change the number of tabs by adding or removing code.

### Option 2

This is the option that can replace Tabview and will pull in pages. But there is a problem with mixing types of Table of Contents. The main page Table of Contents will not reflect any headers from the sub pages and if you add a TOC to the subpage it may break the main article page TOC. It is actually best to eliminate headers from any sub page or at least limit it to no more then two. Hopefully as more wiki's migrate over they will complain to fandom and fandom technical support will eventually fix this conflict.

#### Articles that are in namespace:

* Open an article for editing and switch to Source mode.
* Copy and paste the following code into your editor.

```
<tabber>
Tab 1={{:Spellmonger Wiki:Main Article/subpage 1}}
</tabber>

```

* Click "Preview" to see that the code produced these tabs:
* Click "Back" to return to editing.
* Edit your tabs by replacing the text of the titles and content with your community's content. **For example**, replace "First Tab Title" with "Characters," and replace the sample text with descriptions and images of your favorite characters. You can also change the number of tabs by adding or removing code.

#### Normal Articles:

* Open an article for editing and switch to Source mode.
* Copy and paste the following code into your editor.
* Note the Colon (**:**) at the start of the article name, this is very important.

```
<tabber>
Tab 1={{:Main Article/subpage 1}}
</tabber>

```

* Click "Preview" to see that the code produced these tabs:
* Click "Back" to return to editing.
* Edit your tabs by replacing the text of the titles and content with your community's content. **For example**, replace "First Tab Title" with "Characters," and replace the sample text with descriptions and images of your favorite characters. You can also change the number of tabs by adding or removing code.

### Issues

#### Citations or References

when adding a reference for a quote, within a Tab element, you will probably see the message "**Cite error: `<ref>` tags exist, but no `<references/>` tag was found"** in red prior to saving the article. As long as the Reference list is included at the bottom of the page, once you save the article this message will go away and the reference will display properly.

#### Broken mobile experience

A lot of the CSS and JavaScript that runs on your desktop/laptop *cannot* on a mobile device. To counter this, Fandom has removed most of that code from the mobile skin - including the stuff that makes Tabber possible. As a result, mobile users won't see any of the visual cues that separate each set of information.

There are problems with additional CSS and HTML hacks used as workarounds, which no amount of user-facing coding can solve. Therefore, that's a lot of effort for very little gain; you might as well use ordinary sections instead.

#### View/edit tab content

Option 1 can be edited from source mode.

Tabber option 2 does not provide a simple way to view/edit the original page. This can be troublesome for inexperienced users that want to edit the content inside a tab. There is now a template that will allow and easy to use link :Type `{{Edit Tab|*</subpage name>*}}` that should be added to the end of the subpage, just above the Reference insert. There is a parameter for the subpage name that is required for this edit to work. It will not work on pages that are not named **main page/subpage**, where **Main page** = the name of the article that contains the Tabber code and **Main page/subpage** is the name of the article embedded as one of the Tabs.

There are a few other issues:

#### Table of Contents

Default TOC doesn't work at all and the templates TOCleft and TOCright only work on 1 page, none of the rest. It is better to just leave any kind of TOC out and let the default generate. The TOC will still show up on any of the pages that are viewed outside of the Tabber view.

#### Category Assignments

If one page is assigned a different category then what the rest are, then all of the articles are added to that category. Such as Sevendor, all of the pages are in Category:Locations, but if you add one page such as "The Bane of Sevendor" which is an Event, then all of the pages or at least the first one, Sevendor, is also assigned to that Category. That can be a problem with auto assigned categories embedded into infoboxes. The same problem exists if one of the pages is assigned to Category:Article Stubs.

### Usage information

* **Formatting:** Keep in mind that the title should always end with an equal sign ("`=`"), and the tab separator ("`|-|`") must always appear between tabs.
* **Wikitext:** You can use any wikitext within your tabs, including templates and images.