« My first external query » : différence entre les versions

De Semantic MediaWiki - Sandbox

(chg)
(chg)
Ligne 1 : Ligne 1 :
; Configuration
<syntaxhighlight lang="php">
$smwgQuerySources = [
'smworg' => 'SMWExternalQueryLookup',
];
$seqlgExternalRepositoryEndpoints = [
'smworg' => [
'https://www.semantic-mediawiki.org/w/index.php/$1',
'https://www.semantic-mediawiki.org/w/api.php',
true
]
];
</syntaxhighlight>
; Syntax
<pre>
{{#ask:
{{#ask:
  [[Category:SMWCon]]
  [[Category:SMWCon]]
Ligne 10 : Ligne 25 :
  |order=descending
  |order=descending
}}
}}
</pre>
; Result
{{#ask:
[[Category:SMWCon]]
[[Category:SMWCon]]
|?Has planned start#-F[Y-m-d]=start date|+align=center
|?Has planned finish#-F[Y-m-d]=end date|+align=center
|source=smworg
|mainlabel=conference
|headers=plain
|sort=Has planned start
|order=descending
}}
[[Category:Semantic External Query Lookup example]]

Version du 5 janvier 2019 à 21:46

Configuration
$smwgQuerySources = [
	'smworg' => 'SMWExternalQueryLookup',
	];
$seqlgExternalRepositoryEndpoints = [
	'smworg' => [
		'https://www.semantic-mediawiki.org/w/index.php/$1',
		'https://www.semantic-mediawiki.org/w/api.php',
		true
		]
	];
Syntax
{{#ask:
 [[Category:SMWCon]]
 [[Has general chair::+]]
 |?Has planned start#-F[Y-m-d]=start date|+align=center
 |?Has planned finish#-F[Y-m-d]=end date|+align=center
 |source=smworg
 |mainlabel=conference
 |headers=plain
 |sort=Has planned start
 |order=descending
}}
Result
Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.