Difference between revisions of "Template:SMWDefaultMarkup"
Jump to navigation
Jump to search
(Unsuspend) |
(Use <span> and visibility property to try to hide the output text) |
||
Line 16: | Line 16: | ||
* [[Property:Has rootFullPageName]] | * [[Property:Has rootFullPageName]] | ||
--> | --> | ||
− | * | + | * [[Property:Display docType]] |
− | |||
* [[Property:Display born on]] | * [[Property:Display born on]] | ||
* [[Property:Display died on]] | * [[Property:Display died on]] | ||
Line 24: | Line 23: | ||
* [[Property:Display image2]] | * [[Property:Display image2]] | ||
* [[Property:Display lifespan]] | * [[Property:Display lifespan]] | ||
− | * [[Property:ON display date]] | + | * [[Property:ON display date]] |
<hr/> | <hr/> | ||
2016-04-18: Addition: | 2016-04-18: Addition: | ||
Line 38: | Line 37: | ||
SUSPENDED 2019-06-19 - Reinsert when the problems are ironed out... | SUSPENDED 2019-06-19 - Reinsert when the problems are ironed out... | ||
− | -->{{Display docType}}[[Display born on::{{LinkYear|{{#show: {{FULLPAGENAME}} | ?Born on}}}}| ]][[Display died on::{{LinkYear|{{#show: {{FULLPAGENAME}} | ?Died on}}}}| ]][[Display image::{{Display image|{{FULLPAGENAME}}}}| ]][[Display image2::{{Display image|{{FULLPAGENAME}}}}| ]]<!--{{Display date}}{{ON display date}}-->{{Display lifespan}}<!-- | + | --><span style="visibility:hidden">{{Display docType}}[[Display born on::{{LinkYear|{{#show: {{FULLPAGENAME}} | ?Born on}}}}| ]][[Display died on::{{LinkYear|{{#show: {{FULLPAGENAME}} | ?Died on}}}}| ]][[Display image::{{Display image|{{FULLPAGENAME}}}}| ]][[Display image2::{{Display image|{{FULLPAGENAME}}}}| ]]<!--{{Display date}}{{ON display date}}-->{{Display lifespan}}<!-- |
SET RATING PROPERTIES -->{{#ifeq: {{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}}|0||[[Has averageRating::{{#expr: {{#ask:[[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]| ?Has value| format=average}} round 1}}| ]]}}[[Has noRatings::{{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}}| ]]<!-- | SET RATING PROPERTIES -->{{#ifeq: {{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}}|0||[[Has averageRating::{{#expr: {{#ask:[[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]| ?Has value| format=average}} round 1}}| ]]}}[[Has noRatings::{{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}}| ]]<!-- | ||
Line 50: | Line 49: | ||
-->{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Is stub }} |true||[[Is not stub::true| ]]}}<!-- | -->{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Is stub }} |true||[[Is not stub::true| ]]}}<!-- | ||
− | -->{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Has objectClass }}|Person|{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Has nationality }} ||[[Has nationality::Unknown| ]]}}}}</includeonly> | + | -->{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Has objectClass }}|Person|{{#ifeq: {{#show: {{FULLPAGENAME}} | ?Has nationality }} ||[[Has nationality::Unknown| ]]}}}}</span></includeonly> |
Revision as of 14:31, 29 June 2019
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:
- Property:Has fullPageName
- Property:Has fullPageNamee
- Property:Has parentFullPageName
- Property:Has revisionSize
- Property:Has revisionUser
- Property:Has averageRating
- Property:Has noRatings
- 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:Display docType
- Property:Display born on
- Property:Display died on
- Property:Display date
- Property:Display image
- Property:Display image2
- Property:Display lifespan
- Property:ON display date
2016-04-18: Addition: It also adds "" if the page was modified within the last 36 hours.