Template:index: Difference between revisions

From Thesaurus Inscriptionum Raeticarum
Jump to navigationJump to search
No edit summary
 
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
[[description::This support template serves to create entries in '''lists of indexes'''.]] It generates a list of pages in which the title word is defined as a value of the [[Property:index]]. In order for this to be done, this template has to be defined as the output template in [[Special:Ask|semantic queries]], using the parameter <code>template=index</code>, and the query results have to be set to plain text format by the parameters <code>mainlabel=-</code> (for no headline) and <code>?#</code> (for no links). Since only existing pages can be found by an automatic index, there has to be a page for every indexed item where index related attributes like [[Special:Categories|categories]] or the [[Property:language]] are defined.
[[description::This support template serves to create entries in '''lists of indexes'''.]] It generates a list of pages in which the title word is defined as a value of the [[Property:index]].


===Examples===
In order for this to be done, this template has to be defined as the output template in [[Special:Ask|semantic queries]], using the parameter <code>template=index</code>, and the query results have to be set to plain text format by the parameters <code>mainlabel=-</code> (for no headline) and <code>?#</code> (for no links). Since only existing pages can be found by an automatic index, there has to be a page for every indexed item where index related attributes like [[Special:Categories|categories]] or the [[Property:language]] are defined.
Create an entry with <code><nowiki>[[index::ualaunal]]</nowiki></code>:
 
*Sample text including [[index::ualaunal]] as indexed item.
=== Usage ===
Create a page for the indexed item including relevant attributes, e.g. <code><nowiki>[[Category:Word]]</nowiki></code> (if you intend to create an index for words):
The code <code><nowiki>{{index|pagename}}</nowiki></code> will create a link to ''pagename'' followed by a list of all pages where ''pagename'' is indexed.
*[[ualaunal]]
 
Call the entries with <code><nowiki>{{index|ualaunal}}</nowiki></code> (for all pages where [[ualaunal]] has been indexed):
=== Example ===
*{{index|ualaunal}}
(1) Create an entry with <code><nowiki>[[index::piθamne]]</nowiki></code>:
Or call a list of entries using an [[Help:Editing#Inline queries|inline query]] like <code><nowiki>{{#ask:[[Category:Word]]|mainlabel=-|?#|format=ul|template=index}}</nowiki></code> for all indexed pages of the [[:Category:Word]] (example results limited to 6):
:This is a sample text including [[index::piθamne]] as indexed item.
(2) Create a page for the indexed item including relevant attributes, e.g. <code><nowiki>[[Category:Word]]</nowiki></code> (if you intend to create an index for words):
:[[piθamne]]
(3) Call the entries with <code><nowiki>{{index|piθamne}}</nowiki></code> (for all pages where [[piθamne]] has been indexed):
:{{index|piθamne}}
Or call a list of entries using an inline query like <code><nowiki>{{#ask:[[Category:Word]]|mainlabel=-|?#|format=ul|template=index}}</nowiki></code> for all indexed pages of the [[:Category:Word]] (example results limited to 6):
{{#ask:[[Category:Word]]|mainlabel=-|?#|format=ul|template=index|limit=6|searchlabel=...}}
{{#ask:[[Category:Word]]|mainlabel=-|?#|format=ul|template=index|limit=6|searchlabel=...}}


[[Category:Text Module]]
[[Category:Text Module]]
</noinclude><includeonly>'''[[{{{1}}}]]''': {{#ask:[[index::{{{1}}}]]|format=list}}</includeonly>
</noinclude><includeonly>'''[[{{{1}}}]]''': {{#ask:[[index::{{{1}}}]]|format=list}}</includeonly>

Revision as of 19:47, 9 August 2013

This support template serves to create entries in lists of indexes. It generates a list of pages in which the title word is defined as a value of the Property:index.

In order for this to be done, this template has to be defined as the output template in semantic queries, using the parameter template=index, and the query results have to be set to plain text format by the parameters mainlabel=- (for no headline) and ?# (for no links). Since only existing pages can be found by an automatic index, there has to be a page for every indexed item where index related attributes like categories or the Property:language are defined.

Usage

The code {{index|pagename}} will create a link to pagename followed by a list of all pages where pagename is indexed.

Example

(1) Create an entry with [[index::piθamne]]:

This is a sample text including piθamne as indexed item.

(2) Create a page for the indexed item including relevant attributes, e.g. [[Category:Word]] (if you intend to create an index for words):

piθamne

(3) Call the entries with {{index|piθamne}} (for all pages where piθamne has been indexed):

piθamne:

Or call a list of entries using an inline query like {{#ask:[[Category:Word]]|mainlabel=-|?#|format=ul|template=index}} for all indexed pages of the Category:Word (example results limited to 6):

  • [[)armatan]]: TV-1.1<ul><li>The part "|)armatan" of the query was not understood.Results might not be as expected.</li> <!--br--><li>The part "]]" of the query was not understood.Results might not be as expected.</li></ul>
  • [[)auþile]]: IT-4, SZ-30, azile, sletile, Þ<ul><li>The part "|)auþile" of the query was not understood.Results might not be as expected.</li> <!--br--><li>The part "]]" of the query was not understood.Results might not be as expected.</li></ul>
  • [[)ke]]: CE-1.4<ul><li>The part "|)ke" of the query was not understood.Results might not be as expected.</li> <!--br--><li>The part "]]" of the query was not understood.Results might not be as expected.</li></ul>
  • [[)le]]: AK-1.6<ul><li>The part "|)le" of the query was not understood.Results might not be as expected.</li> <!--br--><li>The part "]]" of the query was not understood.Results might not be as expected.</li></ul>
  • [[)na]]: SR-2<ul><li>The part "|)na" of the query was not understood.Results might not be as expected.</li> <!--br--><li>The part "]]" of the query was not understood.Results might not be as expected.</li></ul>
  • [[)nu]]: MA-20, SR-2<ul><li>The part "|)nu" of the query was not understood.Results might not be as expected.</li> <!--br--><li>The part "]]" of the query was not understood.Results might not be as expected.</li></ul>

...