Template:Index: Difference between revisions

From Greyhawk Wiki
Jump to navigation Jump to search
Rexidos (talk | contribs)
No edit summary
Adding Usage for new {{index}} syntax
Line 1: Line 1:
<noinclude>==About this template==
<noinclude>==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.
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.
Line 9: Line 10:


==Usage==
==Usage==
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:
=== Full References Section ===
  <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 23: Line 24:
<pre><nowiki>{{index}}</nowiki></pre>
<pre><nowiki>{{index}}</nowiki></pre>


If there are syntax errors due to unusual characters in the title, or the Encyclopedia Greyhawkania Index lists the Topic in an unusual way (e.g. ""Magical Arts, University of" or "Kuroth's Quill"), the actual code for the database search and table should be inserted.  <br />
=== Errors ===
Change the "TOPIC WORD HERE" and "OTHER TOPIC WORD" in the code below, ensuring the "%" symbols are kept.<br />
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 resultsThis 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.
'''DO NOT''' use this code if the Topic is a single word and the table produces normal results by using <nowiki>{{index}}</nowiki> instead.  <br />
 
The code is as follows:
<pre><nowiki>{{index|title=}}</nowiki></pre>
<pre>
 
{{#get_db_data:
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 "Johydess' Mask".  Use only the words of the Topic, without the unusual punctuation.
db=index-db
 
|from=index_data
<pre>{{index|title=TOPICWORD%' AND Topic LIKE '%ANOTHERWORD}}</pre>
|where=Topic LIKE '%TOPIC WORD HERE%' AND Topic LIKE '%OTHER TOPIC WORD%'
 
|order by=Topic
=== Examples ===
|limit=500
{| class="wikitable"
|data=Description=Description,Product=Product,PageCardImage=PageCardImage, Topic=Topic, Type=Type
|-
}}
! Page Name !! Code Example
{| class="wikitable sortable" style="width: 90%;"
|-
! style="width: 30%"| Topic
| Thrommel IV || <code><nowiki>{{index|title=Thrommel}}</nowiki></code>
! style="width: 10%"| Type
|-
! style="width: 15%"| Description
| Brother Milerjoi || <code><nowiki>{{index|title=Milerjoi}}</nowiki></code>
! style="width: 25%"| Product
|-
! style="width: 15%"| Page/Card/Image
| Royal Guild of Navigators || <code><nowiki>{{index|title=Navigators, Royal Guild of}}</nowiki></code>
{{#for_external_table:<nowiki/>
|-
{{!}}-
| Knights of Holy Shielding|| <code><nowiki>{{index|title=Holy Shielding, Knights of}}</nowiki></code>  or just  <code><nowiki>{{index|title=Holy Shielding}}</nowiki></code>
{{!}} {{{Topic}}}  
|-
{{!}} {{{Type}}}
| Dar-Kesh-Anam || <code><nowiki>{{index|title=Dar%' AND Topic LIKE '%Anam}}</nowiki></code>
{{!}} {{{Description}}}
|-
{{!}} {{{Product}}}
|Kuroth's Quill || <code><nowiki>{{index|title=Kuroth%' AND Topic LIKE '%Quill}}</nowiki></code>
{{!}} {{{PageCardImage}}}
|-
}}
|Johydee's Mask || <code><nowiki>{{index|title=Johydee%' AND Topic LIKE '%Mask}}</nowiki></code>
|}</pre></noinclude><h3>Encyclopedia Greyhawkania Index</h3>
|-
| Battle of Karndred's Meadows || <code><nowiki>{{index|title=Karndred%' AND Topic LIKE '%Meadow}}</nowiki></code>
 
|}</noinclude><h3>Encyclopedia Greyhawkania Index</h3>
 
The Index is based on previous work of Jason Zavoda through '08, and his work as continued and updated by a French fan group, Eric Johnson, Richard DiIola, Jason "PupickDad" Jaobson, and numerous other fans over the years.
The Index is based on previous work of Jason Zavoda through '08, and his work as continued and updated by a French fan group, Eric Johnson, Richard DiIola, Jason "PupickDad" Jaobson, and numerous other fans over the years.



Revision as of 13:22, 28 January 2022

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

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]]

When included by itself, the template should typically 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}}

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. This 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.

{{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 "Johydess' 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}}

Encyclopedia Greyhawkania Index

The Index is based on previous work of Jason Zavoda through '08, and his work as continued and updated by a French fan group, Eric Johnson, Richard DiIola, Jason "PupickDad" Jaobson, 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. Please visit the Edit Encyclopedia Index page to contribute to the wiki database.

Topic Type Description Product Page/Card/Image