Template:UnitsNavbox: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
N (talk | contribs)
No edit summary
N (talk | contribs)
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>{|class="mw-collapsible white-toggle-button {{#if:{{{collapsed|}}}|mw-collapsed}}" style="text-align:center;border-collapse:collapse;border: 1px solid #BCB096; width:100%;"
<includeonly><!--
!{{{title|[[Units]]}}}
--><templatestyles src="Template:UnitsNavbox/styles.css" /><!--
|-style="border: 1px solid #BCB096;"
--><div class='units-navbox'><!--
|{{F|Temple|{{{l|en}}} }}
==================================HUMAN=========================================
|-style="border: 1px solid #BCB096;"
-->{{#switch: {{{faction|}}}
|style="padding:4px;"|
|human
<div style="margin:2px;display:inline-block;">
|=<!--
<div style="margin:1px;border: 1px solid #BCB096;background-color:grey;display:inline-
--><div class='header human'><!--
    -->{{UnitsNavbox/faction
        | lang = {{{lang}}}
        | name_en = Temple
        | text = {{Translation|wiki_units_nav_human|{{{lang}}}}}
    }}<!--
--></div><!--
--><div class='town human'><!--
    --><div class='group'><!--
        -->{{UnitsNavbox/unit|{{{lang}}}|esquire}}<!--
        -->{{UnitsNavbox/unit|{{{lang}}}|esquire_upg}}<!--
        -->{{UnitsNavbox/unit|{{{lang}}}|esquire_upg_alt}}<!--
    --></div><!--
    --><div class='group'><!--
        -->{{UnitsNavbox/unit|{{{lang}}}|crossbowman}}<!--
        -->{{UnitsNavbox/


==Use==
==1. Only the Temple faction:==
<nowiki>{</nowiki>{'''UnitsNavbox'''|title=''Infobox title''|l=''Language code''|collapsed=''Any text''}}
*<code>''Infobox title''</code> — automatic translation for the infobox title is not provided, so it must be entered every time when calling the template.
*<code>''Any text''</code> — enter any text to make the navbox collapsed by default; ignore this parameter to make the navbox expanded by default.
{{LanguageCodesNote}}
==Examples==
<pre>{{UnitsNavbox|collapsed=1}}</pre>
{{UnitsNavbox|collapsed=1}}
<pre>{{UnitsNavbox|title=[[Существа]]|l=ru|t=1|collapsed=1}}</pre>
{{UnitsNavbox|title=[[Существа]]|l=ru|t=1|collapsed=1}}
<pre>{{UnitsNavbox|title=[[Units/pl|Jednostki]]|l=pl|collapsed=1}}</pre>
{{UnitsNavbox|title=[[Units/pl|Jednostki]]|l=pl|collapsed=1}}


[[Category:Navbox templates]]
{{Color|yellow|Input:}} <code><nowiki>{{UnitsNavbox|lang=en|faction=human}}</nowiki></code>
 
{{Color|green|Output:}} {{UnitsNavbox|lang=en|faction=human}}
 
==2. All factions:==
 
{{Color|yellow|Input:}} <code><nowiki>{{UnitsNavbox|lang=en}}</nowiki></code>
 
{{Color|green|Output:}} {{UnitsNavbox|lang=en}}
 
==3. Japanese:==
 
{{Color|yellow|Input:}} <code><nowiki>{{UnitsNavbox|lang=ja|faction=human}}</nowiki></code>
 
{{Color|green|Output:}} {{UnitsNavbox|lang=ja|faction=human}}
 
==4. With no additional links at the end:==
 
{{Color|yellow|Input:}} <code><nowiki>{{UnitsNavbox|lang=en|faction=human|nolinks=1}}</nowiki></code>
 
{{Color|green|Output:}} {{UnitsNavbox|lang=en|faction=human|nolinks=1}}
 
</noinclude>

Latest revision as of 15:33, 23 July 2026


1. Only the Temple faction:

Input: {{UnitsNavbox|lang=en|faction=human}}

Output:

2. All factions:

Input: {{UnitsNavbox|lang=en}}

Output:

3. Japanese:

Input: {{UnitsNavbox|lang=ja|faction=human}}

Output: