m (fix notation to remove alias line break) |
m (add params to disable anchor for {{{1-4}}}) |
||
(56 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{Doc}} | {{Doc}} | ||
</noinclude><includeonly><!-- Begin template code | <!--{| class="wikitable sortable" border="1" | ||
-->|- valign="top" <!-- Start new table row | !colspan="5"|<font size="5">Waze Glossary</font><br>(With sortable entries!) | ||
-->{{#ifeq:{{{noanchor|}}}|yes|<!-- If "noanchor" is set to yes, don't output any anchors | |- | ||
!Glossary Term!!Abbreviation<br />Acronym<br />Alias!!class="unsortable"|Description!!width="10" data-sort-type="isoDate"|<small>Date Updated<br />----<br />Date Added</small> | |||
{{User:PesachZ/Glossary/Glossary item|term=No-Anchor title|Noanchor|Hidden|NA|NAT|desc=This row displays identically to other rows but does not produces any anchors. A link to #No-Anchor title will not bring you to this entry.|updated=2015-02-08|added=2014-02-13|noanchor=yes|related1=testing}} | |||
{{User:PesachZ/Glossary/Glossary item|term=No-Anchor title|Noanchor|Hidden|NA|NAT|desc=This row displays identically to other rows but does not produces any anchors. A link to #No-Anchor title will not bring you to this entry.|updated=2015-02-08|added=2014-02-13|noanchor=yes|jump1=No-Anchor title}}--> | |||
</noinclude><includeonly><!-- | |||
############################################################################### | |||
Begin template code | |||
############################################################################### --><!-- begin table row --> | |||
|- valign="top" <!-- Start new table row --> | |||
|<!-- ### Begin Term Cell ### -->{{#ifeq:{{{noanchor|}}}|yes|<!-- If "noanchor" is set to yes, don't output any anchors | |||
-->|<!-- If not output an anchor starting with the term name -->{{anchor|{{{term|}}}<!-- Then if up to 4 additional aliases are present | -->|<!-- If not output an anchor starting with the term name -->{{anchor|{{{term|}}}<!-- Then if up to 4 additional aliases are present | ||
-->{{#if:{{{ | -->|{{#if:{{{noanchor1|}}}|<!-- If noanchor1 is set, do not add {{{1}}} to the anchor. Used for duplicate abbrs -->|{{{1|}}}}}|{{#if:{{{noanchor2|}}}||{{{2|}}}}}|{{#if:{{{noanchor3|}}}||{{{3|}}}}}|{{#if:{{{noanchor4|}}}||{{{4|}}}}}|{{{anchor1|}}}<!-- if up to 4 non display anchors are specified, add them to the anchor | ||
-->|{{{anchor2|}}}|{{{anchor3|}}}|{{{anchor4|}}}<!-- | |||
--> | |||
end anchor -->}}<!-- | end anchor -->}}<!-- | ||
end IF "noanchor" -->}} | end IF "noanchor" -->}}<!-- Place anchors at beginning of first cell then | ||
-->'''{{{term|}}}'''<!-- Fill first cell of row with "term" --> | |||
| <!-- use trim for unnamed parameters to eliminate extra whitespace | | <!-- use trim for unnamed parameters to eliminate extra whitespace | ||
-->{{Trim| {{{1|}}} }}<!-- fill second cell with 1st alias | -->{{Trim| {{{1|~}}} }}<!-- fill second cell with 1st alias, if there is no alias put a "~" so it goes to the bottom when sorting this column. | ||
-->{{#if:{{{2|}}}<!-- if there's a second alias --> | -->{{#if:{{{2|}}}<!-- if there's a second alias --> | ||
|,}}<!-- then place a comma | |,}}<!-- then place a comma | ||
-->{{Trim|{{{2|}}}}}<!-- followed by the second alias | --> {{Trim|{{{2|}}}}}<!-- followed by the second alias | ||
-->{{#if:{{{3|}}}|,}} {{Trim|{{{3|}}}}}{{#if:{{{4|}}}|,}} {{Trim|{{{4|}}}}} <!-- repeat for up to 4 aliases --> | -->{{#if:{{{3|}}}|,}} {{Trim|{{{3|}}}}}{{#if:{{{4|}}}|,}} {{Trim|{{{4|}}}}} <!-- repeat for up to 4 aliases --> | ||
| {{{desc|}}} <!-- place the description in | |<!-- ## Start description cell ## -->{{#if:{{{jump1|}}}|{{note label|{{{jump1|}}}-{{{term|}}}}}}}<!-- If jump1 is set create a jump back link using the {{note label}} template with the identifier in the format of related_article-term to match the related links identifiers. Do the same for the following jump parameters | ||
|<small><small> {{{updated|}}}{{#if:{{{added|}}}|<br> | -->{{#if:{{{jump2|}}}|{{note label|{{{jump2|}}}-{{{term|}}}}}}}{{#if:{{{jump3|}}}|{{note label|{{{jump3|}}}-{{{term|}}}}}}}{{#if:{{{jump4|}}}|{{note label|{{{jump4|}}}-{{{term|}}}}}}}<!--comment out end jump if}}<!-- end jump if | ||
{{{added|}}}}} </small></small><!-- | -->{{{desc|}}} <!-- place the description under the jump links --> | ||
{{#if:{{{related1|}}}<!-- If there is a related1 entry that links into this entry | |||
-->|{{#if:{{{desc|}}}|<small><small><small><br /> | |||
<!-- small empty line between related entries and description --> | |||
</small></small></small>}}<!-- add a line break if there is a desc above | |||
--><small>Related entries:</small> <sub>{{ref|{{{term|}}}-{{{related1|}}}|{{{related1|}}}}}</sub> <!-- Then put the {{ref}} link for that term here, and check for additional related entries adding them in with • between them. | |||
-->{{#if:{{{related2|}}}| • <sub>{{ref|{{{term|}}}-{{{related2|}}}|{{{related2|}}}}}</sub>}} {{#if:{{{related3|}}}| • <sub>{{ref|{{{term|}}}-{{{related3|}}}|{{{related3|}}}}}</sub>}} {{#if:{{{related4|}}}| • <sub>{{ref|{{{term|}}}-{{{related4|}}}|{{{related4|}}}}}</sub>}} {{#if:{{{related5|}}}| • <sub>{{ref|{{{term|}}}-{{{related5|}}}|{{{related5|}}}}}</sub>}} {{#if:{{{related6|}}}| • <sub>{{ref|{{{term|}}}-{{{related6|}}}|{{{related6|}}}}}</sub>}} {{#if:{{{related7|}}}| • <sub>{{ref|{{{term|}}}-{{{related7|}}}|{{{related7|}}}}}</sub>}} {{#if:{{{related8|}}}| • <sub>{{ref|{{{term|}}}-{{{related8|}}}|{{{related8|}}}}}</sub>}} {{#if:{{{related9|}}}| • <sub>{{ref|{{{term|}}}-{{{related9|}}}|{{{related9|}}}}}</sub>}} {{#if:{{{related10|}}}| • <sub>{{ref|{{{term|}}}-{{{related10|}}}|{{{related10|}}}}}</sub>}} {{#if:{{{related11|}}}| • <sub>{{ref|{{{term|}}}-{{{related11|}}}|{{{related11|}}}}}</sub>}} {{#if:{{{related12|}}}| • <sub>{{ref|{{{term|}}}-{{{related12|}}}|{{{related12|}}}}}</sub>}} {{#if:{{{related13|}}}| • <sub>{{ref|{{{term|}}}-{{{related13|}}}|{{{related13|}}}}}</sub>}} {{#if:{{{related14|}}}| • <sub>{{ref|{{{term|}}}-{{{related14|}}}|{{{related14|}}}}}</sub>}} {{#if:{{{related15|}}}| • <sub>{{ref|{{{term|}}}-{{{related15|}}}|{{{related15|}}}}}</sub>}} {{#if:{{{related16|}}}| • <sub>{{ref|{{{term|}}}-{{{related16|}}}|{{{related16|}}}}}</sub>}} {{#if:{{{related17|}}}| • <sub>{{ref|{{{term|}}}-{{{related17|}}}|{{{related17|}}}}}</sub>}} {{#if:{{{related18|}}}| • <sub>{{ref|{{{term|}}}-{{{related18|}}}|{{{related18|}}}}}</sub>}} {{#if:{{{related19|}}}| • <sub>{{ref|{{{term|}}}-{{{related19|}}}|{{{related19|}}}}}</sub>}} {{#if:{{{related20|}}}| • <sub>{{ref|{{{term|}}}-{{{related20|}}}|{{{related20|}}}}}</sub>}} <!--end related1 if-->}} | |||
|<!-- ## Start date cell ## -->style=text-align:center;|<small><small> {{#if:{{{updated|}}}<!--if there an updated date then | |||
-->|{{{updated|}}} (U)<!-- place the last updated date followed by "(U)" in the 4th cell, and end if>-->}}{{#if:{{{added|}}}<!-- if there is an added date... --> | |||
|{{#if:{{{updated|}}}<!-- then if there was also an updated date... --> | |||
|<br>}}<!-- add a line break --> | |||
{{{added|}}} (A)}} </small></small><!-- followed by the date added with an "(A)" on the next line --></includeonly> |
Latest revision as of 05:35, 9 October 2015
This templates produces an entry for the glossary table. It should be added on a new line in the glossary page.
Add the new term in the correct place in the glossary by alphabetical order sorted by the term name.
Leave an empty line between each entry template.
The template has three required parameters, and the optional parameters. The term, description, and date last updated parameters are required. The four abbreviations / aliases, four non displayed anchor names, noanchor, and date added parameters are optional.
The template will produce a table row with the aliases in the second column separate by commas. It will also add an {{anchor}} for the term name, each of the aliases/abbreviations, and each of the specified non-display anchor names as well at the top of the table row.
If you do not want an anchor to be produced for a specific entry row, you can prevent it by specifying the |noanchor=yes
Parameters
A star (*) next a parameter shows it is required for proper use.
|term=
*Glossary term
|<abbreviation/alias>
There can be up to 4 abbreviations/aliases as unnamed parameters. Just add the abbreviation in ALL CAPS, or the alias preceded by a pipe (|) character.
|<2nd abbreviation/alias>
|<3rd abbreviation/alias>
|<4th abbreviation/alias>
|anchor1=<non-displayed anchor name>
|anchor2=<second non-displayed anchor name>
|anchor3=<third non-displayed anchor name>
|anchor4=<fourth non-displayed anchor name>
|noanchor=yes
Putting this parameter in the entry template will prevent this entry from generating any anchors based on the term name or abbreviations/aliases.
|description=
*Glossary term description.
|updated=
*The date this entry was last updated. Use the YYYY-MM-DD format.
|added=
The date this entry was first added to the glossary. Use the YYYY-MM-DD format.
|related1=<The exact Term Name of a related entry which links to this entry>
These are case sensitive, and must be spelled exactly correct to work. This will be displayed in a horizontal list above the description as a link. These should be placed in any entry which is linked to from the description of another entry. For example if the entry for "Angle" has links to "Junction Angle", "Roundabout Angle", "Turn Angle", and "Junction Angle Info", the a |related#=Angle
parameter should be placed in each of those entries indicating that the "Angle" entry links to those entries. These are required to be in place in the corresponding entries for any |jump#=
links in other entries to work, they only work in pairs. Be sure you add a |jump#=
parameter to any corresponding entries when using this parameter. You can specify up to 20 entries using the |related1=
... |related20=
parameters. This parameter must be defined, in order for the following 19 parameters to be activated.
|related2=<second exact Term Name>
These 19 following parameters are only available if |related1=
is set.
|related3=<third exact Term Name>
...
|related20=<twentieth exact Term Name>
|jump1=<The exact Term Name of a related entry which this entry links to>
These are case sensitive, and must be spelled exactly correct to work. This will be displayed after the "Related Entries" links at the top of the description. They are displayed simply as a ^ which jumps back to the related entry when clicked on. These are required to be in place in the corresponding entries for any |related#=
links in other entries to work, they only work in pairs. Be sure you add a |related#=
parameter to any corresponding entries when using this parameter. In the above example of the "Angle" entry which links to the "Junction Angle", "Roundabout Angle", "Turn Angle", and "Junction Angle Info" entries, you would add |jump1=Junction Angle
|jump2=Roundabout Angle
|jump3=Turn Angle
and |jump4=Junction Angle Info
into the entry for "Angle". You can specify up to 4 entries using the |jump1=
... |jump4=
parameters.
|jump2=<second exact Term Name>
|jump3=<second exact Term Name>
|jump4=<second exact Term Name>
|noanchor1=yes
Prevents the first unnamed parameter from being added to the anchor.
|noanchor2=yes
Prevents the second unnamed parameter from being added to the anchor.
|noanchor3=yes
Prevents the third unnamed parameter from being added to the anchor.
|noanchor4=yes
Prevents the fourth unnamed parameter from being added to the anchor.
Examples
{{/Glossary item
|term = Entry title
| ET
| Title
| Entry
| Fourth
|desc = Here you put the definition and links to further information I.e. disambiguation pages and articles etc. This row include a link to the Table entry.
|related1 = Glossary
|related2 = Template
|jump1 = Table
|updated = 2015-01-25
|added = 2014-02-13}}
{{/Glossary item
|term = Glossary
|desc = This is an entry describing the Glossary concept, and includes a link to the Entry title entry.
|jump1 = Entry title
|updated = 2015-02-13
|added = 2014-02-13}}
{{/Glossary item
|term = Template
|desc = This is an entry describing templates, and includes a link to the Entry title entry as a template example.
|jump1 = Entry title
|updated = 2015-02-13
|added = 2014-02-13}}
{{/Glossary item
|term = Table
|desc = This is an entry describing tables, and is linked to from the Entry title entry template.
|related1 = Entry title
|updated = 2015-02-13
|added = 2014-02-13}}
Produces ↓
Waze Glossary (With sortable entries!) | ||||
---|---|---|---|---|
Glossary Term | Abbreviation / Acronym | Description | Date Updated Date Added
|
{{/Glossary item
|term = Entry title
| ET
| Title
| Entry
| Fourth
| anchor1 = entry title
| anchor2 = Entry Title
| anchor3 = Entry titles
| anchor4 = Entry Titles
|desc = This entry like all default entries produces anchors for the term, all aliases, and non-displayed anchors. Therefore a link to #entry title, #Entry Title, #Entry titles, #Entry Titles will all come to this row. Since links only point to the first matching anchor on a page links to #Entry title, #ET, #Title, #Entry, or #Fourth will go to the first example.
|updated = 2015-01-25
|added = 2014-02-13}}
Produces ↓
Waze Glossary (With sortable entries!) | ||||
---|---|---|---|---|
Glossary Term | Abbreviation / Acronym | Description | Date Updated Date Added
|
again a table row visually identical to the one above, but this one also includes anchor for four common misspellings of the title. This can be used for backwards compatibility to previous glossary entry anchors. This is also got practice in sober cases to include common spelling variations.
{{/Glossary item
|term = No-Anchor title
| Noanchor
| Hidden
| NA
| NAT
|desc = This row displays identically to other rows but does not produces any anchors. A link to #No-Anchor title will not bring you to this entry.
|updated = 2015-02-08
|added = 2014-02-13
|noanchor = yes}}
Produces ↓
Waze Glossary (With sortable entries!) | ||||
---|---|---|---|---|
Glossary Term | Abbreviation / Acronym | Description | Date Updated Date Added
|
This method is great for entries which are actually just aliases linking to other entries. This helps appreciate the problem of multiple anchors for the same alias on the page shown in the previous example.
Future planned modifications
- an in page anchor search (pipe dream)
The above documentation is transcluded from Template:Glossary item/doc. Please add categories to the /doc subpage. Subpages of this template. |