Timeline: Difference between revisions
Created page with "{{Feature |description=Produce timelines from data |examples=<pre> {{#ask: Modification date::+ |format=moderntimeline |?Modification date }} </pre> }} {{#ask: Modification date::+ |format=moderntimeline |?Modification date }}" |
m typo |
||
| (10 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Feature | {{Feature | ||
|image=View-calendar-timeline.svg | |||
|imgdesc=calendar timeline | |||
|description=Produce timelines from data | |description=Produce timelines from data | ||
| | |notes=There are also the legacy 'timeline' and 'eventline' formats. | ||
}} | |||
The [https://github.com/ProfessionalWiki/ModernTimeline Extension:ModernTimeline] provides the [[Semantic MediaWiki]] result format of '''[https://www.semantic-mediawiki.org/wiki/Help:Moderntimeline_format moderntimeline]''' which outputs your query data into a timeline as shown below. | |||
The query | |||
<pre> | |||
{{#ask: | {{#ask: | ||
[[Modification date::+]] | <!-- [[Modification date::+]] --> | ||
|format=moderntimeline | <!-- [[Modification date::>={{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}]] --> | ||
[[Modification date::>={{CURRENTYEAR}}-{{CURRENTMONTH}}]] | |||
[[Has_image::+]] | |||
|format=moderntimeline | |||
<!-- | format=timeline | |||
| format=eventline --> | |||
|image property=Has_image | |||
|?Has_image#100px;x100px;thumb | |||
|?Modification date | |?Modification date | ||
|sort=Modification date | |||
|order=asc | |||
|start at end=on | |||
|width=75% | |||
|height=500px | |||
|limit=50 | |||
|default=no recent edits | |||
|template=Timeline | |||
}} | }} | ||
</pre> | </pre> | ||
results in the following | |||
{{#ask: | {{#ask: | ||
[[Modification date::+]] | <!-- [[Modification date::+]] --> | ||
|format=moderntimeline | <!-- [[Modification date::>={{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}]] --> | ||
[[Modification date::>={{CURRENTYEAR}}-{{CURRENTMONTH}}]] | |||
[[Has_image::+]] | |||
|format=moderntimeline | |||
<!-- | format=timeline | |||
| format=eventline --> | |||
|image property=Has_image | |||
|?Has_image#100px;x100px;thumb | |||
|?Modification date | |?Modification date | ||
|sort=Modification date | |||
|order=asc | |||
|start at end=on | |||
|width=75% | |||
|height=500px | |||
|limit=50 | |||
|default=no recent edits | |||
|template=Timeline | |||
}} | }} | ||
==Debugging== | |||
This code works to show the thumbnail, <nowiki>{{#show: Svg|?Has image#100px;x100px;thumb}}</nowiki> so I don't know why I can't get modern timeline to show the thumbnail. I tried formatting the ask query output with a template and got the thumbnail to show up, but I'm afraid the Feature template needs to be revised to assign properties and parameters better to get the right results. | |||
==Parameters== | |||
The parser function for showing the documentation of supported functionality: | |||
<nowiki>{{#smwdoc: moderntimeline}}</nowiki> | |||