Template:Index: Difference between revisions

From Greyhawk Wiki
Jump to navigation Jump to search
Ari5av (talk | contribs)
Documenting the exact=1 argument
Reorg for "Usage"' adding categories
Line 9: Line 9:


==Usage==
==Usage==
The template should almost always be added as the ''last'' line under the <code><nowiki>'''Bibliography'''</nowiki></code> heading'' near the ''end'' of a wiki page, just above categories.
This usage is simply:
<pre><nowiki>{{index}}</nowiki></pre>
This results in a table at the end of the page which contains product references and page numbers. 
{{index}}
=== Parameters ===
;title :The name of the page topic, only if it differs from the page name.  Use a word from the name of the page subject.
::<code><nowiki>{{index|title=SujectWord}}</nowiki></code>
:The above method can also be used to include results relating to the Topic if other Topics include the same word; e.g. using <code><nowiki>Thrommel</nowiki></code> instead of <code><nowiki>Thrommel IV</nowiki></code> will give results including all the rulers named Thrommel.
: For more precise results, to narrow the result list, multiple words can be added to the search query.
::<code><nowiki>{{index|title=SubjectWord%' AND Topic LIKE '%AnotherRelatedWord}}</nowiki></code>
:"Topic" can be replaced with "Description" or "Type" to give different results.
:Either "<code>AND</code>" or "<code>OR</code>" are allowed in the query.
;exact : <code><nowiki>{{index|exact=1}}</nowiki></code>Used to exclude other results where the topic is included in the name. 
=== Full References Section ===
=== Full References Section ===
This template is typically included in the "References" section of most pages. It is usually placed ''after'' all other References, so that it populates at the bottom of the page. <br/>Other than when the Index entry needs special function to include or exclude other words in its database search, it usually looks like this:  <pre><nowiki>==References==
This template is typically included in the "References" section of most pages. It is usually placed ''after'' all other References, so that it populates at the bottom of the page. <br/>Other than when the Index entry needs special function to include or exclude other words in its database search, it usually looks like this:  <pre><nowiki>
==References==
===Citations===
===Citations===
<references />
<references />
Line 19: Line 37:
</nowiki></pre>
</nowiki></pre>


When included by itself, the template should typically be added as the ''last'' line under the <code><nowiki>'''Bibliography'''</nowiki></code> heading'' near the ''end'' of a wiki page, just above categories.  
=== Exact results only ===
This usage is simply:  
If you wish to show only exact title results, omitting entries ''containing'' the title, add the <code>|exact=1</code> parameter to the template
<pre><nowiki>{{index}}</nowiki></pre>
:<code><nowiki>{{index|title=Barrier Peaks|exact=1}}</nowiki></code>.
This example would return only entries where the title is exactly "Barrier Peaks", instead of also including other miscellaneous entries containing that phrase, like ''"Expedition to the Barrier Peaks"'' or ''"Horn of the Barrier Peaks"''.
 
=== Index table only ===
Used when the EGI introduction paragraph is not desired, for other formatting reasons.
:<code><nowiki>{{indextableonly}}</nowiki></code>
:<code><nowiki>{{indextableonly|SubjectWord}}</nowiki></code>


=== Errors ===  
== Errors ==  
If there are syntax errors due to the Encyclopedia Greyhawkania Index listing the Topic in an unusual way (e.g. "Magical Arts, University of"), the <code>title</code> should be altered to get proper EGI results.  This method can also be used to include results relating to the Topic if other Topics include the same word; e.g. using <code><nowiki>Thrommel</nowiki></code> instead of <code><nowiki>Thrommel IV</nowiki></code> will give results including all the rulers named Thrommel.
If there are syntax errors due to the Encyclopedia Greyhawkania Index listing the Topic in an unusual way (e.g. "Magical Arts, University of"), the <code>title</code> should be altered to get proper EGI results.   


<pre><nowiki>{{index|title=}}</nowiki></pre>
:<code><nowiki>{{index|title=}}</nowiki></code>


Errors may also result from punctuation or unusual characters in the Topic's name.  This template can be used to eliminate these errors on pages with titles such as "Kuroth's Quill" or "Johydee's Mask".  Use only the words of the Topic, without the unusual punctuation.
Errors may also result from punctuation or unusual characters in the Topic's name.  This template can be used to eliminate these errors on pages with titles such as "Kuroth's Quill" or "Johydee's Mask".  Use only the words of the Topic, without the unusual punctuation.


<pre>{{index|title=TOPICWORD%' AND Topic LIKE '%ANOTHERWORD}}</pre>
:<code><nowiki>{{index|title=TOPICWORD%' AND Topic LIKE '%ANOTHERWORD}}</nowiki></code>


=== Examples ===
=== Examples ===
Line 54: Line 78:


|}
|}
=== Exact results only ===
If you wish to show only exact title results, omitting entries ''containing'' the title, add the <code>|exact=1</code> argument, as in <code><nowiki>{{index|title=Barrier Peaks|exact=1}}</nowiki></code>.  This example would return only entries where the title is exactly "Barrier Peaks", instead of also including other miscellaneous entries containing that phrase.


</noinclude><includeonly><h3>Encyclopedia Greyhawkania Index</h3>
</noinclude><includeonly><h3>Encyclopedia Greyhawkania Index</h3>
Line 83: Line 104:
}}
}}
|}</includeonly>
|}</includeonly>
[[Category:Citation templates]]
[[Category:Format templates]]
[[Category:Documentation]]
[[Category:Documentation pages]]
[[Category:Template documentation pages]]

Revision as of 11:27, 27 July 2024

About this template

This template should be included at the bottom of all pages, in the "References" after the last line of the bibliography. It will automatically generate a table including data from the Encyclopedia Grehawkania Index based upon the title (Topic) of the page on which it is included.

If there are no entries currently in the EGIndex database for the Topic, a blank table with no entries will be displayed, similar to that shown below at the end of this page.

If you find a page with a blank table with data missing in the table, information from officially published sources can be added to the EGI to produce new lines on the table. Preview the Types and full Product names in the Encyclopedia Greyhawkania Index in order to keep entries uniform.

Please visit the Edit Encyclopedia Index page to contribute to the wiki database.

Usage

The template should almost always be added as the last line under the '''Bibliography''' heading near the end of a wiki page, just above categories. This usage is simply:

{{index}}

This results in a table at the end of the page which contains product references and page numbers.

Encyclopedia Greyhawkania Index

The Index is based on previous work of Jason Zavoda through '08, and his work as continued and updated by Eric Johnson, Richard DiIoia, Jason "PupickDad" Jacobson, a French fan group, and numerous other fans over the years. The wiki page for the EGI has a list of sources, full product names, abbreviations, and a link to the full, downloadable index.

Topic Type Description Product Page/Card/Image

Parameters

title
The name of the page topic, only if it differs from the page name. Use a word from the name of the page subject.
{{index|title=SujectWord}}
The above method can also be used to include results relating to the Topic if other Topics include the same word; e.g. using Thrommel instead of Thrommel IV will give results including all the rulers named Thrommel.
For more precise results, to narrow the result list, multiple words can be added to the search query.
{{index|title=SubjectWord%' AND Topic LIKE '%AnotherRelatedWord}}
"Topic" can be replaced with "Description" or "Type" to give different results.
Either "AND" or "OR" are allowed in the query.
exact
{{index|exact=1}}Used to exclude other results where the topic is included in the name.

Full References Section

This template is typically included in the "References" section of most pages. It is usually placed after all other References, so that it populates at the bottom of the page.
Other than when the Index entry needs special function to include or exclude other words in its database search, it usually looks like this:

==References==
===Citations===
<references />
===Bibliography===
{{index}}

[[Categories:INSERT CATEGORY NAME]]

Exact results only

If you wish to show only exact title results, omitting entries containing the title, add the |exact=1 parameter to the template

{{index|title=Barrier Peaks|exact=1}}.

This example would return only entries where the title is exactly "Barrier Peaks", instead of also including other miscellaneous entries containing that phrase, like "Expedition to the Barrier Peaks" or "Horn of the Barrier Peaks".

Index table only

Used when the EGI introduction paragraph is not desired, for other formatting reasons.

{{indextableonly}}
{{indextableonly|SubjectWord}}

Errors

If there are syntax errors due to the Encyclopedia Greyhawkania Index listing the Topic in an unusual way (e.g. "Magical Arts, University of"), the title should be altered to get proper EGI results.

{{index|title=}}

Errors may also result from punctuation or unusual characters in the Topic's name. This template can be used to eliminate these errors on pages with titles such as "Kuroth's Quill" or "Johydee's Mask". Use only the words of the Topic, without the unusual punctuation.

{{index|title=TOPICWORD%' AND Topic LIKE '%ANOTHERWORD}}

Examples

Page Name Code Example
Thrommel IV {{index|title=Thrommel}}
Brother Milerjoi {{index|title=Milerjoi}}
Royal Guild of Navigators {{index|title=Navigators, Royal Guild of}}
Knights of Holy Shielding {{index|title=Holy Shielding, Knights of}} or just {{index|title=Holy Shielding}}
Dar-Kesh-Anam {{index|title=Dar%' AND Topic LIKE '%Anam}}
Kuroth's Quill {{index|title=Kuroth%' AND Topic LIKE '%Quill}}
Johydee's Mask {{index|title=Johydee%' AND Topic LIKE '%Mask}}
Battle of Karndred's Meadows {{index|title=Karndred%' AND Topic LIKE '%Meadow}}