Template:Decree/doc

这是Template:Decree的模板文档
当直接浏览时,使用变量可能会失效,请不要使用硬编码来代替页面名或地址。


Decree can be used to create info tooltips or table rows for each decree.

Parameters

Parameter Description Required Default
1 English localized decree name Required none
index Tooltip index, for tooltip-in-a-tooltip use
  • 1, 2, or 3
  • Set to nothing to prevent tooltip
Optional 1
table Formats output as a table row instead of tooltip, if set to anything Optional none

Parameter 1 must be the proper English localized name of the decree:

Emergency Relief Greener Grass Campaign
Encourage Agricultural Industry Promote National Values
Encourage Manufacturing Industry Promote Social Mobility
Encourage Resource Industry Road Maintenance
Enlistment Efforts Violent Suppression

Tooltip usage

This template can be used in paragraphs by wrapping the paragraph in a <div></div> or <span></span> tag, otherwise it breaks the paragraph layout. It can be used in wiki lists or table cells without issue otherwise.

Table usage

This template outputs into the following table format. The template should be put in the first column and it generates the remaining columns for its row.

Name Required technology Conditions Modifiers
Template goes here

Each decree in the table requires its own use of the template in a new row.

Examples

{{Decree|Enlistment Efforts}} results in

{{#invoke:Decree|main

|Enlistment Efforts |table= |index=1

}}

Note the line break; wrapping the paragraph in <span></span> results in:

{{Decree|Enlistment Efforts}} results in {{#invoke:Decree|main

|Enlistment Efforts |table= |index=1

}}

Setting the index to nothing prevents a tooltip and sets just a basic icon display:

{{Decree|Enlistment Efforts|index=}} results in {{#invoke:Decree|main |Enlistment Efforts |table= |index= }}

Table usage appears as follows

Name Required technology Conditions Modifiers
{{Decree|Enlistment Efforts|table=1}} results in
main Enlistment Efforts table=1 index=1

}}