Difference between revisions of "Template:Display class icon"
Jump to navigation
Jump to search
(#show is the tool for the job here, not #ask) |
m (t) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{#if: {{{1|}}}|{{#show: {{{1}}}|?Has objectClass2}}.png}} | + | <noinclude>[[category:Semantic Utility Templates]]'''This is a semantic utility template to return the plaintext name of an icon for the page.'''<br/> |
+ | The logic is: | ||
+ | * If the page has a [[Property:Has objectClass|Has objectClass]] property, then use that. | ||
+ | * Else look at the namespace, and use that.</noinclude><includeonly>{{#if: {{{1|}}}|File:{{#if: {{#show: {{{1}}}|?Has objectClass2}}|{{#show: {{{1}}}|?Has objectClass2}}.png|{{#switch: {{NAMESPACE:{{{1|}}}}} | ||
+ | | =Main.png | ||
+ | | Talk = Talk.png | ||
+ | | User = User.png | ||
+ | | User talk =User_talk.png | ||
+ | | Project =WikispooksPage.png | ||
+ | | Project talk=WikispooksPage_talk.png | ||
+ | | File = File.png | ||
+ | | File talk=File_talk.png | ||
+ | | MediaWiki = Property.png | ||
+ | | MediaWiki talk = Property.png | ||
+ | | Help = Help.png | ||
+ | | Help talk=Help_png.png | ||
+ | | Category =Category.png | ||
+ | | Category talk=Category_talk.png | ||
+ | | Template =Template.png | ||
+ | | Template talk=Template_talk.png | ||
+ | | Property = Property.png | ||
+ | | Property talk = Property_talk.png | ||
+ | | Type | ||
+ | | Type talk | ||
+ | | Form | ||
+ | | Form talk | ||
+ | | Concept | ||
+ | | Concept talk = Template.png | ||
+ | | Document = Document.png | ||
+ | | Document talk = Document_talk.png | ||
+ | | Wikipedia = Property.png | ||
+ | | Wikipedia talk = Property.png | ||
+ | | Test = Test.png | ||
+ | | Test talk = Test_talk.png | ||
+ | | Widget | ||
+ | | Widget talk | ||
+ | | Layer | ||
+ | | Layer talk | ||
+ | | Module | ||
+ | | Module talk = Template.png | ||
+ | }}}}}}</includeonly> |
Latest revision as of 02:25, 16 July 2015
This is a semantic utility template to return the plaintext name of an icon for the page.
The logic is:
- If the page has a Has objectClass property, then use that.
- Else look at the namespace, and use that.