Difference between revisions of "Template:SMWDefaultMarkup"

From Wikispooks
Jump to navigation Jump to search
(Fix?)
(set "Has fullpagename")
Line 1: Line 1:
<noinclude>'''This template adds SMWData to the page, based on the existing data.''' It has no parameters. It is currently very simple.
+
<noinclude>'''This template adds SMWData to the page, based on the existing data.''' It has no parameters. It is currently simple.
  
If the page is an allowed [[Property:DocType]], it sets  
+
#The page is assigned a [[Property:Has fullpagename]] set to its full pagename
[[Property:Has key properties]] and [[Property:Has key property headers]] so that the examples format nicely.</noinclude><includeonly>
+
#If the page is an allowed [[Property:DocType]], it sets  
{{#ifexpr: {{#ask: [[DocType::{{PAGENAME}}]]|format=count}}>0|{{SMWData|KeyProperties=Is about/Has author/Has publication date/Description|KeyPropertyHeaders=Subject(s)/Author(s)/Published/Description}}}}</includeonly>
+
[[Property:Has key properties]] and [[Property:Has key property headers]] so that the examples format nicely.</noinclude><includeonly>[[Has fullpagename::{{FULLPAGENAME}}}]]{{#ifexpr: {{#ask: [[DocType::{{PAGENAME}}]]|format=count}}>0|{{SMWData|KeyProperties=Is about/Has author/Has publication date/Description|KeyPropertyHeaders=Subject(s)/Author(s)/Published/Description}}}}</includeonly>

Revision as of 04:56, 2 January 2014

This template adds SMWData to the page, based on the existing data. It has no parameters. It is currently simple.

  1. The page is assigned a Property:Has fullpagename set to its full pagename
  2. If the page is an allowed Property:DocType, it sets

Property:Has key properties and Property:Has key property headers so that the examples format nicely.