Help:F.tag

From Semantic Portal Wiki

Jump to: navigation, search
Help:F.tag Template:F.tag

IMPORTANT NOTICE:


Contents

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 }}<!--
-->
  1. type: Test Category 2 (hidden)
  2. 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 }}<!--
-->
|}
type Test Category 2 (hidden)
type Test Category 2 (hidden)
Facts about F.tagRDF feed
AuthorLi Ding  +
DescriptionAdd semantic tag (triple/triples) to a wiki page with display option
Lastmodified9 September 2009 19:56:28  +
PackageSmwbp foundation templates  +
TestTest Page 1  +, File:Test Page 3  +, Test Page, 4  +, Test Page, 5  +, and Test Page, 6  +
Version0.21  +
Semantic Web Community
Tetherless World constellation
maintenance