WikiTask Tutorial/Temperature table

From BITPlan Wiki
Jump to navigation Jump to search

temperature with another template

Let's now take the same input "temperature" (this time at the end of this wikipage) but use a different template. We'd like to get a Wiki table

Freemarker template for Wiki table of triples

The id of this template is id='tripletable'

<#assign triples=tripleStore.getTriples()/>
== Triple table ==
{|class="wikitable sortable"
!subject!!predicate!!object
|-
<#list triples as triple>
| ${triple.subject} || ${triple.predicate} || ${triple.object}
|-
</#list>
|}

WikiTask for wikitable from temperature example

{{wikitask|cmd=runtemplate|input=temperature|template=tripletable|targetpage=WikiTask Tutorial/temperatureTable}}

runtemplate -> WikiTask Tutorial/temperatureTable

Expected result

{|class="wikitable sortable"
!subject!!predicate!!object
|-
| Temperature || today || cool
|-
| Temperature || yesterday || modest
|-
| Temperature || tomorrow || warm
|-
| Cloud || today || cloudy
|-
| Cloud || yesterday || partly
|-
| Cloud || tommorrow || sunny
|-
|}
subject predicate object
Temperature today cool
Temperature yesterday modest
Temperature tomorrow warm
Cloud today cloudy
Cloud yesterday partly
Cloud tommorrow sunny

SiDIF input for temperature example

This is some SiDIF input. It has the id='temperature'

Temperature today cool
Temperature yesterday modest
Temperature tomorrow warm
Cloud today cloudy
Cloud yesterday partly
Cloud tommorrow sunny