Take Snapshot

De Semantic MediaWiki - Sandbox

To take a 'snapshot' of the results of an ask query, use safesubst when calling the function.

For example:

{{safesubst:#ask: [[:+]]
 |?Creation date
 |?Last editor is
 |limit=5
 |format=ul
 }}

If entered on an page, on saving this would substitute the results/output (writing the information to the page) instead of leaving a dynamic reference.

Output

... further results


Formatting

However, the raw output format can make for a messy result (not the clean wiki-markup you might expect). To get around this, you can use the template format which will give you additional control over what is being substituted (not to mention, control over how 'deep' of a substitution you want to do).

{{safesubst:#ask: [[:+]]
 |?Creation date
 |?Last editor is
 |limit=5
 |template=safesubst:Snapshot
 }}
 Creation date"Creation date" is a predefined property that corresponds to the date of the first revision of a subject and is provided by Semantic MediaWiki.Last editor is"Last editor is" is a predefined property that contains the page name of the user who created the last revision and is provided by Semantic MediaWiki.
[[::smw-border:|:smw-border:]]
"Just a Test, nothing less, nothing more" by Noe, Jane; Doe, John19 juillet 2017 15:46:13HermannSchwaerzler
"Just a Test, nothing less, nothing more" by Noe, Jane; Doe, John
"Just a Test, nothing less, nothing more" by Noe, Jane; Doe, John
"Next Test - no mapping property" by Doe, John; Noe, Jane20 juillet 2017 06:59:18HermannSchwaerzler
... further results
Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.