Template:HeroClass: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary
No edit summary
Line 1: Line 1:
<!-- Template:HeroClass
<includeonly><div class="heroclass-template" style="display:flex; gap:16px; align-items:flex-start; width:100%;">
 
Parameters:
- class: (required) class name as used in p.data (case-sensitive)
- description: (optional) class description wikitext
- notes: (optional) class notes or designer notes
- faction: (optional) faction name to pass to Module:HeroesUtil|heroTable (e.g. Dungeon, Temple). When provided the template will call the module to render the heroes list for that faction.
 
Usage example:
{{Template:HeroClass
|class = Overlord
|description = Overlords are tactical commanders ...
|notes = Some developer notes or rules.
}}
 
This template renders a two-column layout: left column contains the class description, notes, and a "Heroes" area listing the provided heroes (each hero collapsible to show the heroBox). The right column shows the class-box produced by Module:HeroClasses.
 
-->
<div class="heroclass-template" style="display:flex; gap:16px; align-items:flex-start; width:100%;">
   <div class="heroclass-main" style="flex:1;">
   <div class="heroclass-main" style="flex:1;">


    == Description ==
== Description ==
     <div class="heroclass-description">{{{description|}}}</div>
     <div class="heroclass-description">{{{description|}}}</div>
     {{Note box|{{{notes|}}}}}
     {{Note box|{{{notes|}}}}}


    == Heroes ==
== Heroes ==
     <div class="heroclass-heroes">
     <div class="heroclass-heroes">
       {{#invoke:HeroesUtil|heroTable|{{{class|}}}}}
       {{#invoke:HeroesUtil|heroTable|{{{class|}}}}}
Line 35: Line 17:
     {{#invoke:HeroClasses|classBox|{{{class}}}}}
     {{#invoke:HeroClasses|classBox|{{{class}}}}}
   </div>
   </div>
</div>
</div></includeonly><noinclude>
This template renders a two-column layout: left column contains the class description, notes, and a "Heroes" area listing the provided heroes (each hero collapsible to show the heroBox). The right column shows the class-box produced by Module:HeroClasses.
 
Parameters:
- class: (required) class name as used in p.data (case-sensitive)
- description: (optional) class description wikitext
- notes: (optional) class notes or designer notes
- faction: (optional) faction name to pass to Module:HeroesUtil|heroTable (e.g. Dungeon, Temple). When provided the template will call the module to render the heroes list for that faction.


<!-- End Template:HeroClass -->
Usage example:
{{Template:HeroClass
|class = Overlord
|description = Overlords are tactical commanders ...
|notes = Some developer notes or rules.
}}
[[Category:Formatting templates]]
</noinclude>

Revision as of 19:04, 28 October 2025

This template renders a two-column layout: left column contains the class description, notes, and a "Heroes" area listing the provided heroes (each hero collapsible to show the heroBox). The right column shows the class-box produced by Module:HeroClasses.

Parameters:

- class: (required) class name as used in p.data (case-sensitive)
- description: (optional) class description wikitext
- notes: (optional) class notes or designer notes
- faction: (optional) faction name to pass to Module:HeroesUtil|heroTable (e.g. Dungeon, Temple). When provided the template will call the module to render the heroes list for that faction.

Usage example:

Description

Overlords are tactical commanders ...
Notes:
    Some developer notes or rules.

Heroes

     Script error: No such module "HeroesUtil".
   Script error: No such module "HeroClasses".