Template:SMW display activity-oneline

From OLPC
Revision as of 16:24, 6 August 2008 by Femslade (talk | contribs)
Jump to navigation Jump to search

In development You can use this template in a semantic query to display 'Activity' semantic information, e.g. the info from Berkeley logo.

Goal is to display information in the same format as Template:Activity and/or Template:Activity-oneline.

Another approach might be to just use format=embedded in the semantic query, which embeds each matching page, and keep the activity info on a subpage, e.g. Berkeley logo/badge

This uses HTML <table> <tr> <td> syntax (copied using View > Source of Activities page, because skierpage heard that trying to use wiki table markup in a template with SMW had all kinds of problems. But should verify that, because it's a hassle to reinvent the layout of Template:Activity-oneline.

The query that calls it needs to request display of these fields in the same order

{{#ask:
  [[ some criteria]] ...
  | format=template
  | template=SMW display activity-oneline
  | ?Sugar icon
   NOTE, missing out on Activity ID
  | ?Short description
  | ?Activity bundle
  | ?Activity version
}}

See query at Activity query examples.

Note that Template:activity-oneline also renders an Activity_ID, but as

 <span class="olpc-activity-id" style="display:none;">{{{activity_id|}}}</span>

so you don't see it.


{{{2}}} {{{1}}}: {{{3}}}
Download: {{{4}}} (v.{{{5}}})