Template:ModelInfoBoxesTemplate: Difference between revisions
Jump to navigation
Jump to search
Mike Dielen (talk | contribs) No edit summary |
Mike Dielen (talk | contribs) No edit summary |
||
Line 8: | Line 8: | ||
</pre> | </pre> | ||
Edit the page to see the template text. | Edit the page to see the template text. | ||
</noinclude> | </noinclude><includeonly>{| style="width: 30em; font-size: 90%; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; text-align:left;" | ||
! style="text-align: center; background-color:#ccccff;" colspan="2"|<span style="font-size: larger;"> | |||
<includeonly> | {{#ask:[[HasLevel::0]][[IsDocumentationOf.-IsDocumentationOf::{{PAGENAME}}]]}}</span> | ||
{| style="width: 30em; font-size: 90%; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; text-align:left;" | |||
! style="text-align: center; background-color:#ccccff;" colspan="2"|<span style="font-size: larger;"> | |||
{{#ask:[[HasLevel::0]][[IsDocumentationOf.-IsDocumentationOf::{{PAGENAME}}]] | |||
|- | |- | ||
| colspan="2"|{{#arraymap: | |||
{{#ask:[[HasLevel::0]][[IsDocumentationOf.-IsDocumentationOf::{{PAGENAME}}]]|link=none|sep=;}} <!-- top page of model documentation --> | |||
|;|x0 | |||
|<ul>{{#arraymap: | |||
{{#ask:[[HasParent::x0]]|? HasSequence-|link=none|sep=;|sort=HasSequence|format=plainlist}} | |||
|;|x1 | |||
|{{#ifexpr:{{#ask:[[HasParent::x1]]|format=count}}=0 <!--no children--> | |||
|<li>[[x1]]</li><!-- no children then just show, else class mw_collapse determination--> | |||
|{{#ifeq:{{PAGENAME}}|x0 <!-- actual page is x0 (root of tree) --> | |||
|<div class="mw-collapsible mw-collapsed"> | |||
|{{#ifeq:{{PAGENAME}}|x1 <!--actual page is x1 --> | |||
|<div class="mw-collapsible"> | |||
|{{#ifeq:{{#ask:[[-HasParent::{{PAGENAME}}]]|link=none }}|x1 <!--actual page is child of x1 --> | |||
|<div class="mw-collapsible"> | |||
|{{#ifeq:{{#ask:[[-HasParent.-HasParent::{{PAGENAME}}]]|link=none }}|x1 <!-- actual page is grandchild of x1--> | |||
|<div class="mw-collapsible"> | |||
|<div class="mw-collapsible mw-collapsed"> | |||
}} <!-- actual page is grandchild --> | |||
}}<!-- actual page is child --> | |||
}} <!--actual page is x1 --> | |||
}} <!----> | |||
<li>[[x1]]</li><!----> | |||
<div class="mw-collapsible-content"><!----> | |||
<ul>{{#arraymap: | |||
{{#ask:[[HasParent::x1]]|? HasSequence-|link=none|sep=;|sort=HasSequence|format=plainlist}} | |||
|;|x2 | |||
|{{#ifexpr:{{#ask:[[HasParent::x2]]|format=count}}=0 <!--no children--> | |||
|<li>[[x2]]</li> <!-- no children then just show, else class mw_collapse determination --> | |||
|{{#ifeq:{{PAGENAME}}|x1 <!-- actual page is parent --> | |||
|<div class="mw-collapsible mw-collapsed"> | |||
|{{#ifeq:{{PAGENAME}}|x2 <!--actual page is x2 --> | |||
|<div class="mw-collapsible"> | |||
|{{#ifeq:{{#ask:[[-HasParent::{{PAGENAME}}]]|link=none}}|x2 <!--actual page is child of x2 --> | |||
|<div class="mw-collapsible"> | |||
|<div class="mw-collapsible mw-collapsed"> | |||
}}<!-- actual page is child --> | |||
}} <!--actual page is x1 --> | |||
}}<!----> | |||
<li>[[x2]]</li><!----> | |||
<div class="mw-collapsible-content"><!----> | |||
<ul>{{#arraymap: | |||
{{#ask:[[HasParent::x2]]|? HasSequence-|link=none|sep=;|sort=HasSequence|format=plainlist}} | |||
|;|x3 | |||
|<li>[[x3]]</li> | |||
|}}</ul></div></div> <!--closing the second level collapse --> | |||
}} <!-- end of second level children --> | |||
|}}</ul></div></div> <!--closing the first level collapse --> | |||
}} <!-- end of first level children --> | |||
|}}</ul> <!-- end x0 is root --> | |||
|}} <!-- end --> | |||
|- | |||
! style="text-align: center; background-color:#ccccff;" colspan="2"|<span style="font-size: larger;">Corresponding documentation</span> | |||
|- | |||
| colspan="2"| | | colspan="2"| | ||
{{# | {{CorrespondingPageTemplate | ||
|{{#show:{{PAGENAME}}|? HasLevel}} | |||
|{{#show:{{PAGENAME}}|? HasSequence}} | |||
|{{{cat|}}} | |||
}} | }} | ||
|- | |||
! style="text-align: center; background-color:#ccccff;" colspan="2" | <span style="font-size: larger;">Previous versions</span> | |||
|} | |- | ||
</includeonly> | | colspan="2"| {{#ask:[[IsArchivedVersionOfModel.-isDocumentationOf::{{PAGENAME}}]]|default=No previous version available|format=ul}} | ||
|- | |||
! style="text-align: center; background-color:#ccccff;" colspan="2"|<span style="font-size: larger;">Model information</span> | |||
|- | |||
! style="width:7em; vertical-align: text-top;"| Model link | |||
|<ul>{{#arraymap:{{#ask:[[-isDocumentationOf::{{PAGENAME}}]]|mainlabel=-|? HasModelLink=|valuesep=;}}|;|link|<li>link</li>|}}</ul> | |||
|- | |||
! style="width:7em; vertical-align: text-top;"| Institution | |||
| {{#ask:[[-isDocumentationOf::{{PAGENAME}}]]|? HasInstitutionText=|mainlabel=-}} | |||
|- | |||
! style="vertical-align: text-top;"|Solution concept | |||
| {{#ask:[[Category:Model]][[-isDocumentationOf::{{PAGENAME}}]]|? HasInfoboxConcept=|mainlabel=-}} | |||
|- | |||
! style="vertical-align: text-top;"|Solution method | |||
| {{#ask:[[Category:Model]][[-isDocumentationOf::{{PAGENAME}}]]|? HasInfoboxMethod=|mainlabel=-}} | |||
|- | |||
! style="vertical-align: text-top;"|Anticipation | |||
| {{#ask:[[Category:Model]][[-isDocumentationOf::{{PAGENAME}}]]|? HasAnticipation=|mainlabel=-}} | |||
|}</includeonly> |
Revision as of 11:32, 17 February 2025
This is the "ModelInfoBoxesTemplate" template. It should be called in the following format:
{{ModelInfoBoxesTemplate |cat=DocumentationCategory }}
Edit the page to see the template text.