Vote button trans.png
April's Project of the Month
It's spring time. It's primary election season!
Click here to find all the information you'll need to cast your ballot.




Difference between revisions of "Help:Header tabs"

From Ballotpedia
Jump to: navigation, search
m
(updated categor)
Line 1: Line 1:
{{help badge}}{{tnr}}This page explains how you can '''install header tabs''' on Ballotpedia articles.
+
{{help badge}}{{tnr}}
 +
 
 +
This page explains how you can '''install header tabs''' on Ballotpedia articles.
  
 
You can see examples of the use of header tabs on these articles:
 
You can see examples of the use of header tabs on these articles:
Line 13: Line 15:
  
 
===Step one===
 
===Step one===
 
 
Typically, when you have sections in an article, you surround the title of a section by a set of two "<nowiki>==</nowiki>" symbols. To convert to header tabs, you have to instead encase the title of the section with just one set of "<nowiki>=</nowiki>" symbols. So, your first step in an existing article that is currently formatted using a vertical Table of Contents is to go through the section headings and remove one <nowiki>=</nowiki> from before and after each section heading.
 
Typically, when you have sections in an article, you surround the title of a section by a set of two "<nowiki>==</nowiki>" symbols. To convert to header tabs, you have to instead encase the title of the section with just one set of "<nowiki>=</nowiki>" symbols. So, your first step in an existing article that is currently formatted using a vertical Table of Contents is to go through the section headings and remove one <nowiki>=</nowiki> from before and after each section heading.
  
Line 21: Line 22:
  
 
==1900-1909==
 
==1900-1909==
 
 
==1910-1919==
 
==1910-1919==
 
 
==1920-1929==
 
==1920-1929==
  
Line 41: Line 40:
  
 
===Step two===
 
===Step two===
 
 
After the final section of the set of section headings you want to convert to header tabs, type:
 
After the final section of the set of section headings you want to convert to header tabs, type:
  
Line 47: Line 45:
  
 
===Step three===
 
===Step three===
 
 
Scroll down to the end of the article and type:
 
Scroll down to the end of the article and type:
  
Line 53: Line 50:
  
 
==Editing within a tab==
 
==Editing within a tab==
 
 
If you've set a page up with header tabs, you can set up the text within one tab to have multiple editable sections.  To do this, for the text within that section, simply use the standard section headings with either double or triple <nowiki>==</nowiki> symbols before and after the subsection heading/title.
 
If you've set a page up with header tabs, you can set up the text within one tab to have multiple editable sections.  To do this, for the text within that section, simply use the standard section headings with either double or triple <nowiki>==</nowiki> symbols before and after the subsection heading/title.
  
Line 78: Line 74:
  
 
==Limitations==
 
==Limitations==
 
 
You can only place one set of header tabs on an article.
 
You can only place one set of header tabs on an article.
  
 
==Header tabs practice==
 
==Header tabs practice==
 
 
To get practice on how to work with header tabs, apply header tabs to one of these pages.  (Once you've done that, delete that page from this list.)
 
To get practice on how to work with header tabs, apply header tabs to one of these pages.  (Once you've done that, delete that page from this list.)
  
Line 89: Line 83:
 
* [[1923 ballot measures]]
 
* [[1923 ballot measures]]
  
==Read more==
+
==Acknowledgement==
 
+
 
* [http://www.mediawiki.org/wiki/Extension:Header_Tabs MediaWiki's description of header tabs]
 
* [http://www.mediawiki.org/wiki/Extension:Header_Tabs MediaWiki's description of header tabs]
  
[[Category:Editing Help]]
+
[[Category:Advanced editing help]]

Revision as of 21:44, 11 July 2013

:Category:Editing help

This page explains how you can install header tabs on Ballotpedia articles.

You can see examples of the use of header tabs on these articles:

The basic idea of header tabs is to have information appear under clickable tabs rather than in a vertical Table of Contents. The title or name that goes on a particular tab would be the name of the section, if you were using a vertical Table of Contents.

How to install

Header tab example

To install header tabs, you need to do three things.

Step one

Typically, when you have sections in an article, you surround the title of a section by a set of two "==" symbols. To convert to header tabs, you have to instead encase the title of the section with just one set of "=" symbols. So, your first step in an existing article that is currently formatted using a vertical Table of Contents is to go through the section headings and remove one = from before and after each section heading.

For example, you would change this:


==1900-1909==
==1910-1919==
==1920-1929==

to this:


=1900-1909=

=1910-1919=

=1920-1929=

Step two

After the final section of the set of section headings you want to convert to header tabs, type:

<headertabs/>

Step three

Scroll down to the end of the article and type:

__NOTOC__

Editing within a tab

If you've set a page up with header tabs, you can set up the text within one tab to have multiple editable sections. To do this, for the text within that section, simply use the standard section headings with either double or triple == symbols before and after the subsection heading/title.

Linking to a tab

You can link from one page on Ballotpedia to a specific tab on a different page.

You do this by typing:

{{#switchtablink:Tab name|Link text|Page name}}

This creates a link to the tab with the name "Tab name", and the text of the link will read "Link text."

Here's an example:

Type:

{{#switchtablink:Utah|Utah ballot measures on the 1958 ballot|1958 ballot measures}}

and get:

Utah ballot measures on the 1958 ballot

This sends the reader to the content on that particular tab. If you don't do this, and you send a reader to that page, they'll be taken to the content of the first tab on the page. Linking to the specific content on a secondary tab is therefore an important convenience for your reader.

Limitations

You can only place one set of header tabs on an article.

Header tabs practice

To get practice on how to work with header tabs, apply header tabs to one of these pages. (Once you've done that, delete that page from this list.)

Acknowledgement