Semantic MediaWiki test: Difference between revisions

From OLPC
Jump to navigation Jump to search
(→‎Trac woes: how to format query results)
 
Line 17: Line 17:
=== Formatting templates ===
=== Formatting templates ===


Want to format results in stuff like [[Template:Test results]] to be bug links. This already uses the #arraymap parser function.
Want to format results in stuff like [[Template:Test results]] to be bug links. This already uses the #arraymap parser function. There are a few ways to do this, see the edits by skierpage in the history of that page, but you have to use [[Template:!]] to insert the '|' pipe symbol in semantic assignments. Template wound up using a nested http link to the bug as the property's alt text — e.g. [[Sample property2::545454{{!}}[http://dev.laptop.org/ticket/5454 #5454]]]

; use <nowiki><trac></nowiki> in alt text
* This works &mdash; [[Sample property2::998866|<trac>998866</trac>]] &mdash; but not in a query template, get <font color="red"> trac extension error: the first argument must be a ticket number</font>. I think the problem is using a pipe symbol inside a template.
; use wiki formatting
*

Latest revision as of 11:26, 6 September 2008

Just for testing SMW. This is nothing to do with OLPC Test results and Test cases.


Type:Code

I'm about to use Sample property::12345 of Type:Code, what happens.

Why not just use <pre> in the alternative text:

Here we go

 ?

Trac woes

Note how numbers appear with commas. That's not what I want!

Sample property2::54321

The good news (click the factbox below) is the (?) symbol for service links doesn't have the comma.

Formatting templates

Want to format results in stuff like Template:Test results to be bug links. This already uses the #arraymap parser function. There are a few ways to do this, see the edits by skierpage in the history of that page, but you have to use Template:! to insert the '|' pipe symbol in semantic assignments. Template wound up using a nested http link to the bug as the property's alt text — e.g. [http://dev.laptop.org/ticket/5454 #5454]