From Semantic Portal Wiki
IMPORTANT NOTICE:
Usage
function: print a SMW link with rendering option
syntax:
{{f.tag|PROPERTY|VALUE|ns= |mode= |format= }}
or
{{f.tag|p=PROPERTY|v=VALUE|ns= |mode= |format= }}
notes:
- PROPERTY: property, reserved term "type" for type declaration.
- VALUE: value (excluding namespace)
options
| option | description
|
| ns= | namespace of value, unassigned by default. set to "Category" when "type" is used as PROPERTY
|
| mode= | parse mode option. possible values: unassigned (default), "list"
|
| format= | format option. possible values:
- ul(default) - bullet; show property, value
- hide - show nothing
- text - only show value (not linked)
- none- only show value (linked)
- ol - bullet; property, value
- tr - table row; show property, value
|
Examples
Adding Typed Links
| description
| code
| result
|
| User may declare the type/category of a wiki page. (s, type, class)
| {{f.tag|type|Test Category 1}}
|
|
| User may declare a regular triple about a wiki page. (s, p, o)
| {{f.tag|test|Test Page 1}}
|
|
| User may still declare a regular wiki link
| {{f.tag||Test Page 2}}
|
|
Using Parameters
using the ns and mode options
| description
| code
| result
|
| user can assert the namespace of the target page using "ns=" option
| {{f.tag|test|Test Page 3 |ns=Image}}
|
|
| User can add multiple values using "mode=list' option
| {{f.tag|type|Test Category 3,Test Category 4 |mode=list }}
|
|
| when using "mode=list' option, the deliminator could be a ';' or ','
| {{f.tag|test|Test Page, 4;Test Page, 5 |mode=list }}
|
|
| when not using "mode=list' option, we will not process ';' or ','
| {{f.tag|test|Test Page, 6 }}
|
|
using the format option
| description
| code
| result
|
| show a typed link with default format which is the same as "format=ul' option
|
{{f.tag|type|Test Category 2 (hidden) }}
{{f.tag|type|Test Category 2 (hidden) }}
|
|
| hide a typed link using "format=hide' option
| {{f.tag|type|Test Category 2 (hidden) |format=hide }}
|
|
| show a typed link without format using "format=none' option
| {{f.tag|type|Test Category 2 (none) |format=none}}
| Test Category 2 (none)
|
| show a typed link without format using "format=text' option
| {{f.tag|type|Test Category 2 (text) |format=text}}
| Test Category 2 (text)
|
| show a typed link using "format=ol' option
|
<!--
-->{{f.tag|type|Test Category 2 (hidden) |format=ol }}<!--
-->{{f.tag|type|Test Category 2 (hidden) |format=ol }}<!--
-->
|
- type: Test Category 2 (hidden)
- type: Test Category 2 (hidden)
|
| show a typed link using "format=tr' option
|
{|- border=1
<!--
-->{{f.tag|type|Test Category 2 (hidden) |format=tr }}<!--
-->{{f.tag|type|Test Category 2 (hidden) |format=tr }}<!--
-->
|}
|
|