ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.
Template:F: Difference between revisions
Jump to navigation
Jump to search
Sorry, Ren. I just couldn't help myself. Now one can link to a specific section in a flag page. |
What a needlessly complicated implementation :P |
||
Line 1: | Line 1: | ||
<includeonly><span style="font-family: monospace;">{{# | <includeonly><span style="font-family: monospace;">{{#if: {{{3|}}} | [[{{{1|Template:F}}}|{{#explode:{{{1|'''ERROR''' no flag provided in Template:F.}}}|#|0}}={{{2|}}}]] | {{#ifeq: {{lc:{{{2|}}}}} | link | [[{{{1|Template:F}}}|{{#explode:{{{1|'''ERROR''' no flag provided in Template:F.}}}|#|0}}]] | {{{1|'''ERROR''' no flag provided in [[Template:F]].}}}{{#if: {{{2|}}} | ={{{2|}}} |}} }} }}</span></includeonly><noinclude>: ''This template should be used in favor of [[Template:tt]] when styling flags.'' | ||
This template is used to format flag mentions on ModEnc pages. Depending on the arguments provided, it can format flags in the following ways: | This template is used to format flag mentions on ModEnc pages. Depending on the arguments provided, it can format flags in the following ways: | ||
Line 12: | Line 12: | ||
==Flag only, linked== | ==Flag only, linked== | ||
<pre>{{f|FLAGNAME|link}}</pre> | <pre>{{f|FLAGNAME|link}}</pre> | ||
This will | This will apply text formatting and link to the flag's page.<br> | ||
' | |||
'''Where''' | '''Where''' | ||
*FLAGNAME = name of the flag to process | *FLAGNAME = name of the flag to process | ||
*link = constant trigger to trigger linking | *link = constant trigger to trigger linking | ||
'''Example:''' <code><nowiki>{{f|Damage|link}}</nowiki></code> {{arr|r}} {{f|Damage|link}}<br> | |||
'''Example:''' <code><nowiki>{{f|Damage|link|IsLocomotor}}</nowiki></code> {{arr|r}} {{f|Damage|link | '''Subsection:''' <code><nowiki>{{f|Damage#IsLocomotor|link}}</nowiki></code> {{arr|r}} {{f|Damage#IsLocomotor|link}} | ||
==Flag with value== | ==Flag with value== | ||
<pre>{{f|FLAGNAME|VALUE}}</pre> | <pre>{{f|FLAGNAME|VALUE}}</pre> | ||
This will | This will apply text formatting and append the provided value.<br> | ||
'''Where''' | '''Where''' | ||
*FLAGNAME = name of the flag to process | *FLAGNAME = name of the flag to process | ||
Line 40: | Line 31: | ||
==Flag with value, linked== | ==Flag with value, linked== | ||
<pre>{{f|FLAGNAME|VALUE|link}}</pre> | <pre>{{f|FLAGNAME|VALUE|link}}</pre> | ||
This will | This will apply text formatting, append the provided value and link to the flag's page.<br> | ||
'''Where''' | '''Where''' | ||
*FLAGNAME = name of the flag to process | *FLAGNAME = name of the flag to process | ||
*VALUE = the value the flag to process should be displayed with | *VALUE = the value the flag to process should be displayed with | ||
*link = constant trigger to trigger linking | *link = constant trigger to trigger linking | ||
'''Example:''' <code><nowiki>{{f|Damage|100|link}}</nowiki></code> {{arr|r}} {{f|Damage|100|link}} | '''Example:''' <code><nowiki>{{f|Damage|100|link}}</nowiki></code> {{arr|r}} {{f|Damage|100|link}}<br> | ||
'''Subsection:''' <code><nowiki>{{f|Damage#IsLocomotor|100|link}}</nowiki></code> {{arr|r}} {{f|Damage#IsLocomotor|100|link}}</noinclude> | |||
< | |||
''' | |||
Revision as of 02:24, 3 December 2009
- This template should be used in favor of Template:tt when styling flags.
This template is used to format flag mentions on ModEnc pages. Depending on the arguments provided, it can format flags in the following ways:
Flag only
{{f|FLAGNAME}}
This will only apply text formatting to the flag.
Where
- FLAGNAME = name of the flag to process
Example: {{f|Damage}}
→ Damage
Flag only, linked
{{f|FLAGNAME|link}}
This will apply text formatting and link to the flag's page.
Where
- FLAGNAME = name of the flag to process
- link = constant trigger to trigger linking
Example: {{f|Damage|link}}
→ Damage
Subsection: {{f|Damage#IsLocomotor|link}}
→ Damage
Flag with value
{{f|FLAGNAME|VALUE}}
This will apply text formatting and append the provided value.
Where
- FLAGNAME = name of the flag to process
- VALUE = the value the flag to process should be displayed with
Example: {{f|Damage|100}}
→ Damage=100
Flag with value, linked
{{f|FLAGNAME|VALUE|link}}
This will apply text formatting, append the provided value and link to the flag's page.
Where
- FLAGNAME = name of the flag to process
- VALUE = the value the flag to process should be displayed with
- link = constant trigger to trigger linking
Example: {{f|Damage|100|link}}
→ Damage=100
Subsection: {{f|Damage#IsLocomotor|100|link}}
→ Damage=100