Difference between revisions of "Template:Ansreq"

From Pathfinder Wiki
Line 1: Line 1:
<noinclude><translate><!--T:1-->
 
 
This template is used to create the header and the answerbox of a requirement. The answerbox needs to be closed by using the [[Template:CloseReq|CloseReq]]-Template.<br>
 
This template is used to create the header and the answerbox of a requirement. The answerbox needs to be closed by using the [[Template:CloseReq|CloseReq]]-Template.<br>
 
For example like that:<br>
 
For example like that:<br>
Line 7: Line 6:
 
:<nowiki>{{CloseReq}}</nowiki>
 
:<nowiki>{{CloseReq}}</nowiki>
 
</div>
 
</div>
The <nowiki><nowiki /></nowiki>-tag is needed so there is no unnecessary line break at the begining of the answer.
+
The <nowiki><nowiki /></nowiki> tag is needed so there is no unnecessary line break at the begining of the answer.
 
For the Example the <nowiki>{{PAGENAME}}</nowiki> was replaced with a fixed name, but at an honor page the template will get the needed information out of the pagename.
 
For the Example the <nowiki>{{PAGENAME}}</nowiki> was replaced with a fixed name, but at an honor page the template will get the needed information out of the pagename.
 
{{Ansreq|num=1|page=AY Honors/Aboriginal Lore}}<nowiki />
 
{{Ansreq|num=1|page=AY Honors/Aboriginal Lore}}<nowiki />
 
This is the example answer. Any MediaWiki-Content is possible (Tables, Templates, ...).
 
This is the example answer. Any MediaWiki-Content is possible (Tables, Templates, ...).
{{CloseReq}}</noinclude>
+
{{CloseReq}}
 
<includeonly><!--
 
<includeonly><!--
 
-------------------------
 
-------------------------
Line 25: Line 24:
 
<b><font size=3 color=#202020>{{#lst:{{#titleparts:{{{page}}}|2|1}}/Requirements{{GetLangSuffix}}|req{{{num}}} }}</font></b>
 
<b><font size=3 color=#202020>{{#lst:{{#titleparts:{{{page}}}|2|1}}/Requirements{{GetLangSuffix}}|req{{{num}}} }}</font></b>
 
</td>
 
</td>
<td class="nomobile" bgcolor=#E5E5FF style="text-align: right; padding:0 0.5em; white-space:nowrap;">{{CustomToggleButton|text={{#switch:{{SUBPAGENAME}}|es=Mostrar/ocultar Respuesta|fr=Afficher/Masquer Réponse|Show/Hide Answer}}|name=ansreq-{{{num|1}}}}}
+
<td class="nomobile" bgcolor=#E5E5FF style="text-align: right; padding:0 0.5em; white-space:nowrap;">{{CustomToggleButton|text={{#switch:{{SUBPAGENAME}}|es=Mostrar/ocultar respuesta|fr=Afficher/Masquer réponse|Show/Hide Answer}}|name=ansreq-{{{num|1}}}}}
 
</td>
 
</td>
 
</tr>
 
</tr>
Line 31: Line 30:
 
<!--create collapsible box for the answers-->
 
<!--create collapsible box for the answers-->
 
<div class="toccolours mw-collapsible" id="mw-customcollapsible-ansreq-{{{num|1}}}"></includeonly>
 
<div class="toccolours mw-collapsible" id="mw-customcollapsible-ansreq-{{{num|1}}}"></includeonly>
<noinclude></translate></noinclude>
 
 
<noinclude>[[Category:Requirements Template]]</noinclude>
 
<noinclude>[[Category:Requirements Template]]</noinclude>

Revision as of 04:45, 15 January 2021

This template is used to create the header and the answerbox of a requirement. The answerbox needs to be closed by using the CloseReq-Template.
For example like that:

{{Ansreq|num=1|page={{PAGENAME}}}}<nowiki />
Here you can write your answer. Any MediaWiki-Content is possible.
{{CloseReq}}

The <nowiki /> tag is needed so there is no unnecessary line break at the begining of the answer. For the Example the {{PAGENAME}} was replaced with a fixed name, but at an honor page the template will get the needed information out of the pagename. This template is used to create the header and the answerbox of a requirement. The answerbox needs to be closed by using the CloseReq-Template.
For example like that:

{{Ansreq|num=1|page={{PAGENAME}}}}<nowiki />
Here you can write your answer. Any MediaWiki-Content is possible.
{{CloseReq}}

The <nowiki /> tag is needed so there is no unnecessary line break at the begining of the answer. For the Example the {{PAGENAME}} was replaced with a fixed name, but at an honor page the template will get the needed information out of the pagename. Template loop detected: Template:Ansreq This is the example answer. Any MediaWiki-Content is possible (Tables, Templates, ...).

1

[Show/Hide Answer]

This is the example answer. Any MediaWiki-Content is possible (Tables, Templates, ...).