Difference between revisions of "Template:Bugfix SMW hased URI"

From TDWG Terms Wiki
Jump to: navigation, search
m
m
Line 11: Line 11:
 
Use it only to set ''hidden'' properties:
 
Use it only to set ''hidden'' properties:
 
  {{#set: vann:preferredNamespaceUri|<nowiki>{{</nowiki>{{PAGENAME}}|http://www.w3.org/2004/02/skos/core#<nowiki>}}}}</nowiki>
 
  {{#set: vann:preferredNamespaceUri|<nowiki>{{</nowiki>{{PAGENAME}}|http://www.w3.org/2004/02/skos/core#<nowiki>}}}}</nowiki>
 +
 +
Or with parameter (if URL has ‘=’ in it)
 
  {{#set: vann:preferredNamespaceUri|<nowiki>{{</nowiki>{{PAGENAME}}|uri=http://www.w3.org/2004/02/skos/core#<nowiki>}}}}</nowiki>
 
  {{#set: vann:preferredNamespaceUri|<nowiki>{{</nowiki>{{PAGENAME}}|uri=http://www.w3.org/2004/02/skos/core#<nowiki>}}}}</nowiki>
 
  {{#set: vann:preferredNamespaceUri|<nowiki>{{</nowiki>{{PAGENAME}}|1=http://www.w3.org/2004/02/skos/core#<nowiki>}}}}</nowiki>
 
  {{#set: vann:preferredNamespaceUri|<nowiki>{{</nowiki>{{PAGENAME}}|1=http://www.w3.org/2004/02/skos/core#<nowiki>}}}}</nowiki>

Revision as of 12:42, 6 September 2016

Problem: Semantic MediaWiki

So this template checks if the final character is a # and adds “%20” to it (a blank character urlencoded). This fixes somehow the storage of # URLs. In addition

Usage

Use it only to set hidden properties:

{{#set: vann:preferredNamespaceUri|{{Bugfix SMW hased URI|http://www.w3.org/2004/02/skos/core#}}}}

Or with parameter (if URL has ‘=’ in it)

{{#set: vann:preferredNamespaceUri|{{Bugfix SMW hased URI|uri=http://www.w3.org/2004/02/skos/core#}}}}
{{#set: vann:preferredNamespaceUri|{{Bugfix SMW hased URI|1=http://www.w3.org/2004/02/skos/core#}}}}