« Links in values » : différence entre les versions

De Semantic MediaWiki - Sandbox

m (Kghbln a déplacé la page Links in values vers Links in values : namefix)
(chg)
 
(4 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
== Annotation ==
<big>→ See the demo page on [[semantic-mw:Demo:Links_in_values|links in values]] for more examples!</big>
 
 
Instead of using [[semantic-mw:in-text annotation|in-text annotation]] one can use the <code>#set</code> parser function to avoid having to touch the [[semantic-mw:Help:$smwgLinksInValues|<code>$smwgLinksInValues</code> configuration parameter]].
== Annotation using the <code>#set</code> parser function ==
<pre>
<pre>
{{#set: Has text=This text contains a link to the [[Main Page]] of this wiki.}}
{{#set: Has text=This text contains a link to the [[Main Page]] of this wiki.}}
Ligne 5 : Ligne 9 :
{{#set: Has text=This text contains a link to the [[Main Page]] of this wiki.}}
{{#set: Has text=This text contains a link to the [[Main Page]] of this wiki.}}


== <code>#show</code> ==
== Query using the <code>#show</code> parser function ==
<pre>
<pre>
{{#show:
{{#show:
  {{PAGENAME}}
  {{PAGENAME}}
|?Has text
|?Has text
}}
}}
</pre>
</pre>
{{#show:
{{#show:
  {{PAGENAME}}
  {{PAGENAME}}
|?Has text
|?Has text
}}
}}


== <code>#ask</code> ==
== Query using the <code>#ask</code> parser function ==
<pre>
<pre>
{{#ask:
{{#ask:
Ligne 29 : Ligne 33 :
}}
}}


[[Category:Examples]]
[[Category:Semantic MediaWiki example]]

Dernière version du 5 janvier 2019 à 14:41

→ See the demo page on links in values for more examples!


Instead of using in-text annotation one can use the #set parser function to avoid having to touch the $smwgLinksInValues configuration parameter.

Annotation using the #set parser function

{{#set: Has text=This text contains a link to the [[Main Page]] of this wiki.}}


Query using the #show parser function

{{#show:
 {{PAGENAME}}
 |?Has text
}}

This text contains a link to the Main Page of this wiki.

Query using the #ask parser function

{{#ask:
 [[{{PAGENAME}}]]
 |?Has text
}}
 Has text
Links in valuesThis text contains a link to the Main Page of this wiki.
Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.