Difference between revisions of "Template:Topic"

From Shangpa Resource Center
 
(32 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
</pre>
 
</pre>
 
Edit the page to see the template text.
 
Edit the page to see the template text.
</noinclude><includeonly>{{#set:ShortDescription={{{Short Description|}}}}}{{#set:LongDescription={{{Long Description|}}}}}{{{Long Description|}}}
+
</noinclude><includeonly>__NOTOC__{{#set:ShortDescription={{{Short Description|}}}}}{{#set:LongDescription={{{Long Description|}}}}}{{{Long Description|}}}
 
{{#arraydefine: MySubTopicsArray
 
{{#arraydefine: MySubTopicsArray
  |{{#ask: [[SubTopics::+]] |mainlabel=- |headers=hide |?SubTopics |limit=5000 }}
+
  |{{#ask: [[Subject::{{BASEPAGENAME}}]] [[SubTopics::+]] |mainlabel=- |headers=hide |link=none |limit=5000 |?SubTopics }}
 
  |, | sort=asc, unique
 
  |, | sort=asc, unique
 
}}
 
}}
 
+
{{#ifeq: {{#arraysize:MySubTopicsArray}} | 0 |  
{{#arrayprint: MySubTopicsArray|<br/>|@@@@|
+
{{#ask: [[Subject::{{BASEPAGENAME}}]] |?TibetanTitle |?Author |headers=hide |format=template | template=TopicListItem |limit=5000 }}
<h2>@@@@</h2>
+
|
{{#ask: [[Category:Text]] [[SubTopics::@@@@]] |headers=hide |?TibetanTitle |?Author }}
+
{{#arrayprint: MySubTopicsArray||@@@@|<h2>@@@@</h2>{{#ask: [[Subject::{{BASEPAGENAME}}]] [[SubTopics::@@@@]] |?TibetanTitle |?Author |headers=hide |format=template | template=TopicListItem }} }}
}}
 
 
 
{{#ask: [[Topics::{{BASEPAGENAME}}]] [[SubTopics::@@@@]]
 
|?TibetanTitle
 
|?WylieTitle
 
|?Author
 
|format=ul
 
 
}}
 
}}
 
[[Category:Topic]]
 
[[Category:Topic]]
 
</includeonly>
 
</includeonly>

Latest revision as of 21:19, 15 December 2019

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

{{Topic
|Short Description=
|Long Description=
}}

Edit the page to see the template text.