Difference between revisions of "Infobox"

From Culture.si
(Created page with "{{VIRTUALSUBPAGES}} {{#if:{{{1|{{#cgi:page|}}}}}| {{#arr:dataloop| {{#fetch:sparql|http://localhost:8890/sparql| prefix csip: <http://culture.si/en/Special:URIResolver/Prop...")
 
 
(22 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
prefix dc:    <http://purl.org/dc/elements/1.1/>
 
prefix dc:    <http://purl.org/dc/elements/1.1/>
 
prefix foaf:  <http://xmlns.com/foaf/0.1/>
 
prefix foaf:  <http://xmlns.com/foaf/0.1/>
select distinct ?name,?label,(coalesce(?ol,?o) as ?value)
+
select distinct ?name,$label,(coalesce(?ol,?o) as ?value)
where {
+
where {  
   ?s rdf:type csic:INFOBOX_DONE.
+
   ?s rdfs:label ?name.
  ?s foaf:name ?name.
+
   ?s rdfs:label '{{{1|{{#cgi:page|}}}}}'.
   ?s foaf:name '{{{1|{{#cgi:page|}}}}}'.
 
 
   ?s ?p ?o.
 
   ?s ?p ?o.
 
   ?p rdfs:label ?label.
 
   ?p rdfs:label ?label.
optional {  ?o rdfs:label ?ol. }
+
  optional {  ?o rdfs:label ?ol. }
 
}
 
}
 
}}
 
}}
|each =  
+
|first =  
  
 +
<div class="info grid1">
 +
{{#ifeq:{{{2|{{#cgi:lang|}}}}}|eng
 +
|{{#eval:wrap|InfoboxEng|label={{{1|{{#cgi:page|}}}}}}}
 +
|{{#eval:wrap|InfoboxSlo|label={{{1|{{#cgi:page|}}}}}}}
 +
}}
 +
</div>
 +
<div class="extra-info grid1">
 +
{{#ifexist:{{{Logo|}}}|<div class="logo">[[{{{Logo|}}}|235px]]</div>}}
 +
</div>
 +
 +
 +
 +
|empty=
 +
{{#arr:dataloop|
 +
{{#fetch:sparql|http://localhost:8890/sparql|
 +
prefix csip:  <http://culture.si/en/Special:URIResolver/Property-3A>
 +
prefix csic:  <http://culture.si/en/Special:URIResolver/Category-3A>
 +
prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#>
 +
prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 +
prefix vc:    <http://www.w3.org/2006/vcard/ns#>
 +
prefix swivt: <http://semantic-mediawiki.org/swivt/1.0#>
 +
prefix dc:    <http://purl.org/dc/elements/1.1/>
 +
prefix foaf:  <http://xmlns.com/foaf/0.1/>
 +
select distinct ?name,$label,(coalesce(?ol,?o) as ?value)
 +
where {
 +
  ?s rdfs:label ?name.
 +
  FILTER regex(?name,'^{{{1|{{#cgi:page|}}}}}')
 +
  ?s ?p ?o.
 +
  ?p rdfs:label ?label.
 +
  optional {  ?o rdfs:label ?ol. }
 +
}
 +
}}
 +
|first =
 +
 +
<div class="info grid1">
 +
{{#ifeq:{{{2|{{#cgi:lang|}}}}}|eng
 +
|{{#eval:wrap|InfoboxEng|label={{{1|{{#cgi:page|}}}}}}}
 +
|{{#eval:wrap|InfoboxSlo|label={{{1|{{#cgi:page|}}}}}}}
 +
}}
 +
</div>
 +
<div class="extra-info grid1">
 +
{{#ifexist:{{{Logo|}}}|<div class="logo">[[{{{Logo|}}}|235px]]</div>}}
 
{{#ifexist:{{{TeaserImg}}}|<div>[[{{{TeaserImg}}}|576px]]</div>}}
 
{{#ifexist:{{{TeaserImg}}}|<div>[[{{{TeaserImg}}}|576px]]</div>}}
 +
</div>
 +
 +
 +
 +
}}
 +
 +
}}
 +
 +
  
{{#eval:wrap|InfoboxSlo}}
 
 
}}
 
}}

Latest revision as of 18:45, 14 December 2016