Template:Title\Old: Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
m (added additional subcat)
(testing arraymap addition as well as sturdier maleonly and female only handling)
Line 6: Line 6:
{{!}}{{
{{!}}{{
#ifeq: {{{page}}} | {{{titlename|{{{page}}}}}} | [[{{{page}}}]] | [[{{{page}}}{{!}}{{{titlename}}}]] }}{{
#ifeq: {{{page}}} | {{{titlename|{{{page}}}}}} | [[{{{page}}}]] | [[{{{page}}}{{!}}{{{titlename}}}]] }}{{
#if: {{{maleonly|}}} | <nowiki>*</nowiki> }}{{
#switch: {{lc:{{{maleonly}}}}} |y|yes=<nowiki>*</nowiki>}}{{
#if: {{{femaleonly|}}} | + }}
#switch: {{lc:{{{femaleonly}}}}} |y|yes= + }}
}}{{
}}{{
#ifeq: {{PAGENAME}} | {{{page}}}
#ifeq: {{PAGENAME}} | {{{page}}}
| <!-- NoInclude -->
| <!-- NoInclude -->
{{ #if: {{{maleonly|}}} |
{{ #switch: {{lc:{{{maleonly}}}}} |y|yes=
: [[title requirement::{{strip|s=Must be male}}]] }}{{
: [[title requirement::{{strip|s=Must be male}}]] }}{{
#if: {{{femaleonly|}}} |
#switch: {{lc:{{{femaleonly}}}}} |y|yes=
: [[title requirement::{{strip|s=Must be female}}]] }}{{
: [[title requirement::{{strip|s=Must be female}}]] }}{{
#if: {{{translation|}}} |
#if: {{{translation|}}} |
: Translation - {{{translation}}} }}{{
: Translation - {{{translation}}} }}{{
#if: {{{subcat|}}} | [[title subcategory is::{{{subcat}}}| ]]}}{{
#if: {{{subcat|}}} |
#if: {{{subcat2|}}} | [[title subcategory is::{{{subcat2}}}| ]]}}{{
{{#arraymap:{{{subcat|}}}|,|x|[[title subcategory is::x]]}}{{
#if: {{{subcat3|}}} | [[title subcategory is::{{{subcat3}}}| ]]}}{{
#if: {{{subcat4|}}} | [[title subcategory is::{{{subcat4}}}| ]]}}{{
#if: {{{subcat5|}}} | [[title subcategory is::{{{subcat5}}}| ]]}}{{
#if: {{{subcat6|}}} | [[title subcategory is::{{{subcat6}}}| ]]}}{{
#if: {{{diff|}}} | [[title difficulty is::{{{diff}}}| ]]}}{{
#if: {{{1|}}} |
#if: {{{1|}}} |
: [[title requirement::{{strip|s={{{1}}} }}]] }}{{
: [[title requirement::{{strip|s={{{1}}} }}]] }}{{
Line 102: Line 97:
|category=category
|category=category
|titlename=<span style="color:green;">title</span><sup style="color:blue;font-size:80%;">[1]</sup>
|titlename=<span style="color:green;">title</span><sup style="color:blue;font-size:80%;">[1]</sup>
|maleonly=<span style="color:orange;">yes</span><sup style="color:blue;font-size:80%;">[2]</sup>
|maleonly=<span style="color:orange;">yes/y/no/n</span><sup style="color:blue;font-size:80%;">[2]</sup>
|femaleonly=<span style="color:orange;">yes</span><sup style="color:blue;font-size:80%;">[2]</sup>
|femaleonly=<span style="color:orange;">yes/y/no/n</span><sup style="color:blue;font-size:80%;">[2]</sup>
|translation=
|translation=
|subcat=
|subcat=
....
|subcat6=
|diff=
|diff=
|Req1
|Req1
Line 116: Line 109:


* [1] -- Only need if pagename is different than title name (such as if there is a disambiguation)
* [1] -- Only need if pagename is different than title name (such as if there is a disambiguation)
* [2] -- Any value entered here will mark these both as "yes"; '''Warning''' bad things<sup>tm</sup> can happen if you enter both.
* [2] -- Adding "yes" or "y" will activate this field; '''Warning''' bad things<sup>tm</sup> can happen if you mark both.
* page -- will have to be manually changed if the page is ever moved.
* page -- will have to be manually changed if the page is ever moved.
* category -- what category of title this is.
* category -- what category of title this is.

Revision as of 03:02, 20 August 2008

USAGE Information:

{{title
   |page={{subst:PAGENAME}}
   |category=category
   |titlename=title[1]
   |maleonly=yes/y/no/n[2]
   |femaleonly=yes/y/no/n[2]
   |translation=
   |subcat=
   |diff=
   |Req1
   |Req2
   ....
   |Req11
 }}
  • [1] -- Only need if pagename is different than title name (such as if there is a disambiguation)
  • [2] -- Adding "yes" or "y" will activate this field; Warning bad thingstm can happen if you mark both.
  • page -- will have to be manually changed if the page is ever moved.
  • category -- what category of title this is.
  • subcat -- Defines lesser categories, such as spellbook, necessary skills, etc. for correct semantic searches.
  • diff -- Used to declare the relative difficulty to achieve the title. See Property:title difficulty is for information on how to determine the value.
  • Req1 ... Req11 -- Each line (note, NO = sign) is the wikitext for that particular title requirement, if more requirements than detailed here are needed, just add them to the particular title page (as if more was allowed) and add a comment on this template's talk page.
  • LEAVE UNUSED (and unneeded) values OUT COMPLETELY. (titlename for example is only needed if the titlename is different than the page-name, such as in Disambiguation issues)