User:Patrick/template

From semanticweb.org
Jump to: navigation, search

Contents

[edit] Annotation in a template

Support for using annotations in templates has to be enabled by the site administrator.

When an annotation tag is added to a template, then on a page that already included the template the factbox is updated, but queries do not yet take the new annotation into account. For that, for the page that includes the template, edit and save has to be applied (purge does not work). After that, also on the page with the query edit and save has to be applied.

[edit] A query in a template

A query in a template is possible, and it can contain {{PAGENAME}}, see e.g. Template:Ask. However, a query with a template parameter only works with substitution, and cannot be used in computations, see Attribute:Weekday_number.

For example, {{ask|San_Diego}} gives only


while {{subst:ask|San_Diego}} gives, at the time of writing:

<ask mainlabel=whole>has part::San_Diego*</ask><ask mainlabel=subevent>subevent of::San_Diegoevent</ask><ask mainlabel="extended object">extends::San_Diego**</ask><ask mainlabel="software/extension">operational on::San_Diego*</ask><ask mainlabel=object>located in::San_Diego*</ask><ask>location of::San_Diego*</ask><ask mainlabel=event>San_Diego *warning.pngThe date "*" was not understood. *warning.pngThe date "*" was not understood. City Country</ask><ask>San_Diego**</ask><ask>San_Diego***</ask><ask>San_Diego**</ask><ask mainlabel=object>in street::San_Diego**</ask><ask mainlabel=city>capital of::San_Diego*</ask><ask mainlabel=area>has capital::San_Diego*</ask><ask mainlabel=area>borders::San_Diego*</ask><ask mainlabel=object>member of::San_Diego*</ask><ask mainlabel=object>has member::San_Diego*</ask><ask mainlabel=object>is a::San_Diego*</ask><ask mainlabel=object>instance of::San_Diego*</ask><ask mainlabel=object>subclass of::San_Diego*</ask><ask mainlabel=object>is in the category::San_Diego**</ask><ask mainlabel=content>license::San_Diego*</ask><ask mainlabel=subject>has category::San_Diego*</ask><ask mainlabel=category>category about::San_Diegoabout</ask><ask mainlabel=country>uses currency::San_Diego*</ask><ask mainlabel=country>uses currency::<q>instance of::San_Diego</q>*</ask><ask>presented as::San_Diego*</ask><ask mainlabel=line>has stop::San_Diego*</ask><ask>near stop::San_Diego*>motuwethfrsasu</ask><ask mainlabel=stop>stop of::<q>has stop::San_Diego</q>***</ask><ask mainlabel=stop>stop of::<q>has stop::San_Diego</q>convenience storecmoctucwecthcfrcsacsu</ask><ask mainlabel=stop>stop of::<q>has stop::San_Diego</q>supermarketsmostuswesthsfrssassu</ask><ask mainlabel=stop>San_Diego</q>warning.png"San_Diego&lt;/q&gt;" cannot be used as a page name in this wiki.discounterdmodtuwarning.png"*" is not a number.dwewarning.png"*" is not a number.dthwarning.png"*" is not a number.dfrwarning.png"*" is not a number.dsawarning.png"*" is not a number.dsu</ask><ask mainlabel="night line">has night stop::San_Diego*</ask><ask mainlabel=stop>stop of::San_Diego**</ask><ask mainlabel=stop>stop of::San_Diegoconvenience storecmoctucwecthcfrcsacsu</ask><ask mainlabel=stop>stop of::San_Diegosupermarketsmostuswesthsfrssassu</ask><ask mainlabel=stop>San_Diegodiscounterdmodtuwarning.png"*" is not a number.dwewarning.png"*" is not a number.dthwarning.png"*" is not a number.dfrwarning.png"*" is not a number.dsawarning.png"*" is not a number.dsu</ask><ask mainlabel=line>has stop::<q>stop of::San_Diego</q>*</ask><ask mainlabel=object>near stop::<q>stop of::San_Diego</q>motuwethfrsasu</ask><ask mainlabel="night stop">night stop of::San_Diego*</ask><ask mainlabel=stop>stop near::San_Diego**</ask><ask mainlabel=stop>stop near::San_Diegoconvenience storecmoctucwecthcfrcsacsu</ask><ask mainlabel=stop>stop near::San_Diegosupermarketsmostuswesthsfrssassu</ask><ask mainlabel=stop>San_Diegodiscounterdmodtuwarning.png"*" is not a number.dwewarning.png"*" is not a number.dthwarning.png"*" is not a number.dfrwarning.png"*" is not a number.dsawarning.png"*" is not a number.dsu</ask><ask mainlabel=site>San_Diego</q>warning.png"San_Diego&lt;/q&gt;" cannot be used as a page name in this wiki.motuwethfrsasu</ask><ask mainlabel=line>has stop::<q>stop near::San_Diego</q>*</ask><ask mainlabel=object>part of::San_Diego*</ask><ask mainlabel=object>San_Diego+*motuwethfrsasu</ask><ask mainlabel=stop>stop near::<q>part of::San_Diego</q>***</ask><ask mainlabel=stop>stop near::<q>part of::San_Diego</q>convenience storecmoctucwecthcfrcsacsu</ask><ask mainlabel=stop>stop near::<q>part of::San_Diego</q>supermarketsmostuswesthsfrssassu</ask><ask mainlabel=stop>San_Diego</q>warning.png"San_Diego&lt;/q&gt;" cannot be used as a page name in this wiki.discounterdmodtuwarning.png"*" is not a number.dwewarning.png"*" is not a number.dthwarning.png"*" is not a number.dfrwarning.png"*" is not a number.dsawarning.png"*" is not a number.dsu</ask>search: [1] [2]

[edit] See also



All categories | properties | types

Advice on Annotation | Ask | Attribute name | Browsing and searching | Category | Chains of relations and attributes | Custom units | Namespace | Relation name | Selection | SearchTriple | Sorting | Templates in SMW


Personal tools
Namespaces

Variants
Actions
Navigation
services
Toolbox