Template:ModelDocumentationTemplate: Difference between revisions

From IAMC-Documentation
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
It should be called in the following format:
It should be called in the following format:
<pre>
<pre>
{ModelDocumentationTemplate
{{ModelDocumentationTemplate
|IsDocumentationOf=
|IsDocumentationOf=
|DocumentationCategory=
|DocumentationCategory=
|HasLevel
|HasSeq
|HasParent
|isEmpty
|isEmpty
}
}}
</pre>
</pre>
Edit the page to see the template text.
Edit the page to see the template text.
Line 15: Line 18:
| colspan="2"|{{#arraymap:
| colspan="2"|{{#arraymap:
   {{#ask:[[HasLevel::0]][[IsDocumentationOf::<q>[[-IsDocumentationOf::{{PAGENAME}}]]</q>]]|link=none|sep=;}}
   {{#ask:[[HasLevel::0]][[IsDocumentationOf::<q>[[-IsDocumentationOf::{{PAGENAME}}]]</q>]]|link=none|sep=;}}
   |;|xx
   |;|x0
   |<ul>
   |<ul>{{#arraymap:
    {{#ask:[[HasParent::xx]]|? HasSequence=|link=none|sep=;|format=template|template=level1Template|sort=HasSequence}}
    {{#ask:[[HasParent::x0]]|? HasSequence-|link=none|sep=;|sort=HasSequence|format=list}}
  </ul>
    |;|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=list}} 
            |;|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=list}} 
                  |;|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>
! style="text-align: center; background-color:#ccccff;"  colspan="2"|<span style="font-size: larger;">Corresponding documentation</span>

Revision as of 10:22, 12 June 2018

This is the "ModelDocumentationTemplate" template. It should be called in the following format:

{{ModelDocumentationTemplate
|IsDocumentationOf=
|DocumentationCategory=
|HasLevel
|HasSeq
|HasParent
|isEmpty
}}

Edit the page to see the template text.