Difference between revisions of "Template:SMWDefaultMarkup"

From Wikispooks
Jump to navigation Jump to search
(Set Display born on and Display died on)
(Has nationality defaults to "unknown")
Line 11: Line 11:
 
* [[Property:Has noRatings]]
 
* [[Property:Has noRatings]]
 
* [[Property:Is not stub]] (Iff [[Property:Is stub]] is not set)
 
* [[Property:Is not stub]] (Iff [[Property:Is stub]] is not set)
 +
* [[Property:Has nationality]] (Set to 'unknown' if [[Property:Has nationality]] is not set)
 
<!--
 
<!--
 
* [[Property:Has pageName]]  
 
* [[Property:Has pageName]]  
Line 37: Line 38:
 
-->{{#ifexpr: {{#expr: {{#time: U | now }} - {{#time: U | {{#show: {{FULLPAGENAME}} | ?Modification date}} }} }} < 129600 |__NOCACHE__}}<!--
 
-->{{#ifexpr: {{#expr: {{#time: U | now }} - {{#time: U | {{#show: {{FULLPAGENAME}} | ?Modification date}} }} }} < 129600 |__NOCACHE__}}<!--
  
SET IS NOT STUB PROPERTY IF NEEDED.
+
SET PROPERTIES IF NEEDED.
Set Property:Is_not_stub unless Property:stub is set.
+
 
-->{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Is stub }} |true||[[Is not stub::true| ]]}}</includeonly>
+
Set Property:Is_not_stub unless Property:stub is set :
 +
-->{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Is stub }} |true||[[Is not stub::true| ]][[Is stub::false| ]]}}<!--
 +
 
 +
-->{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Has objectClass }}|Person|{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Has nationality }} ||[[Has nationality::Unknown| ]]}}}}</includeonly>

Revision as of 20:37, 23 November 2017

This template adds SMWData to the page, based on the existing data. It has no parameters. It is currently fairly simple, and should probably remain that way, because it affects so many pages and has the potential to tie up the SMW jobs queue.


The following properties are set:


2016-04-18: Addition: It also adds "__NOCACHE__" if the page was modified within the last 36 hours.