Template

TablePreview: Difference between revisions

(style update)
m (added: Usage)
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
{{!}}-
{{!}}-
{{!}}}
{{!}}}
<noinclude>
== Usage ==
* '''pagetitle:''' A regular title or the [https://www.mediawiki.org/wiki/Help:Links#Internal_links internal link] to a page
* '''code:''' The SPARQL query
<pre style="background-color:#F5F5F5;">
{{TablePreview|pagetitle=[[Feature_Demo]]
|desc=
This page gives a couple of examples of what the graph can do.
|code=
#defaultView:Graph
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT ?resource ?resourceLabel ?item ?itemLabel ?image WHERE {
  ?item wdt:P21 ?resource
  VALUES ?item {wd:Q108}
  OPTIONAL{ ?item wdt:P11 ?image.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}}
</pre>
</noinclude>

Latest revision as of 10:16, 9 October 2023

{{{pagetitle}}}
{{{desc}}}


Usage

  • pagetitle: A regular title or the internal link to a page
  • code: The SPARQL query


{{TablePreview|pagetitle=[[Feature_Demo]]
|desc=
This page gives a couple of examples of what the graph can do. 
|code=
#defaultView:Graph
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT ?resource ?resourceLabel ?item ?itemLabel ?image WHERE {
  ?item wdt:P21 ?resource
  VALUES ?item {wd:Q108}
  OPTIONAL{ ?item wdt:P11 ?image.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}}