Difference between revisions of "Template:SMWDefaultMarkup"

From Wikispooks
Jump to navigation Jump to search
(Display image2)
Line 9: Line 9:
 
* [[Property:Has averageRating]]
 
* [[Property:Has averageRating]]
 
* [[Property:Has noRatings]]
 
* [[Property:Has noRatings]]
 +
* [[Property:Is not stub]] (Iff [[Property:Is stub]] is not set)
 
<!--
 
<!--
 
* [[Property:Has pageName]]  
 
* [[Property:Has pageName]]  
Line 31: Line 32:
  
 
Set __NOCACHE__ if the page was modified within the last 36 hours (129600 seconds)
 
Set __NOCACHE__ if the page was modified within the last 36 hours (129600 seconds)
-->{{#ifexpr: {{#expr: {{#time: U | now }} - {{#time: U | {{#show: {{FULLPAGENAME}} | ?Modification date}} }} }} < 129600 |__NOCACHE__}}</includeonly>
+
-->{{#ifexpr: {{#expr: {{#time: U | now }} - {{#time: U | {{#show: {{FULLPAGENAME}} | ?Modification date}} }} }} < 129600 |__NOCACHE__}}<!--
 +
 
 +
SET IS NOT STUB PROPERTY IF NEEDED.
 +
Set Property:Is_not_stub unless Property:stub is set.
 +
-->{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Is stub }} |true|is stub|not stub[[Is not stub::true| ]]}}</includeonly>

Revision as of 05:33, 9 September 2016

This template adds SMWData to the page, based on the existing data. It has no parameters. It is currently 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.