Template:AlphaIndexStart/doc View history

(Created doc page for template)
 
(Added info on Anchor use)
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}
== Usage ==
== Usage ==
Creates the initial {{tag|div|o}} style to add a horizontal alphabetical index to a page of headers with just alphabetical entries.
Creates the initial {{tag|div|o}} style to add a horizontal alphabetical index to a page of headers with just alphabetical entries.


Requires the {{tl|AlphaIndexEnd}} be placed at the end of the last heading section.
Requires the {{tl|AlphaIndexEnd}} be placed at the end of the last heading section.
Headings can be at any legitimate level. Missing headings have no link on the page, so selecting them will not move to anyplace on the page unless an {{tl|anchor}} is added to the prior heading.
If no headings are present on the page, use the {{tl|anchor}} template to create entries just above each alphabetically unique entry.


== Parameters ==
== Parameters ==
The only parameter is optional and determines how many columns are used for the page. The default is 3.
The only parameter is optional and determines how many columns are used for the page. The default is 3. To change the column count to 4 (or any number of columns), enter a value as the only parameter like:
:{{tl|AlphaIndexStart|4}}
 
== Example ==
=== With sections ===
<pre>{{AlphaIndexStart}}
=== A ===
* Apple
 
=== B ===
* Baker
 
=== Z ===
* Zebra
{{AlphaIndexEnd}}
</pre>
 
The page [[North Carolina/Cities and Towns]] uses this template to see it in action.
 
=== Without sections ===
<pre>{{AlphaIndexStart}}
{{anchor|A}}
* Apple
 
{{anchor|B}}
* Baker
 
{{anchor|Z}}
* Zebra
{{AlphaIndexEnd}}
</pre>
 




<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- CATEGORIES HERE, THANKS -->
[[Category:Page Formatting Templates]]
[[Category:Page Formatting Templates]]
}}</includeonly>

Revision as of 23:30, 16 March 2014

This is a documentation subpage for Template:AlphaIndexStart.
It contains usage information, categories and other content that is not part of the original template page.

Usage

Creates the initial <div> style to add a horizontal alphabetical index to a page of headers with just alphabetical entries.

Requires the {{AlphaIndexEnd}} be placed at the end of the last heading section.

Headings can be at any legitimate level. Missing headings have no link on the page, so selecting them will not move to anyplace on the page unless an {{anchor}} is added to the prior heading.

If no headings are present on the page, use the {{anchor}} template to create entries just above each alphabetically unique entry.

Parameters

The only parameter is optional and determines how many columns are used for the page. The default is 3. To change the column count to 4 (or any number of columns), enter a value as the only parameter like:

{{AlphaIndexStart}}

Example

With sections

{{AlphaIndexStart}}
=== A ===
* Apple

=== B ===
* Baker

=== Z ===
* Zebra
{{AlphaIndexEnd}}

The page North Carolina/Cities and Towns uses this template to see it in action.

Without sections

{{AlphaIndexStart}}
{{anchor|A}}
* Apple

{{anchor|B}}
* Baker

{{anchor|Z}}
* Zebra
{{AlphaIndexEnd}}