Difference between revisions of "Template:Bugfix SMW hased URI"
From TDWG Terms Wiki
m (removed category) |
m (+property) |
||
Line 5: | Line 5: | ||
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 | 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 | ||
− | * [[:Category:Internal - SMW bugfix URI hashed]] | + | * [[:Category:Internal - SMW bugfix URI hashed]] is set |
== Usage == | == Usage == | ||
− | + | <nowiki>{{</nowiki>{{PAGENAME}}|uri=http://www.w3.org/2004/02/skos/core#<nowiki>|property=vann:preferredNamespaceUri}}</nowiki> | |
− | + | ||
− | + | ||
− | + | == Parameters == | |
− | + | ||
+ | {| class="vertical-align-top" | ||
+ | |- | ||
+ | | 1=<br />uri= || (mandatory) uri value | ||
+ | |- | ||
+ | | property= || (mandatory) the property to set | ||
+ | |} | ||
[[Category:Bugfix]] | [[Category:Bugfix]] | ||
</noinclude><includeonly><!-- | </noinclude><includeonly><!-- | ||
-->{{#ifexpr: {{#rpos: {{{1|{{{uri|}}}}}}|#}} = ({{#len: {{{1|{{{uri|}}}}}}}} - 1)<!-- | -->{{#ifexpr: {{#rpos: {{{1|{{{uri|}}}}}}|#}} = ({{#len: {{{1|{{{uri|}}}}}}}} - 1)<!-- | ||
− | then-->|{{{1|{{{uri|}}}}}}%20<!-- | + | then-->|{{#set: {{{property|}}}={{{1|{{{uri|}}}}}}%20}}[[:Category:Internal - SMW bugfix URI hashed]]<!-- |
− | else-->|{{{1|{{{uri|}}}}}}<!-- | + | else-->|{{#set: {{{property|}}}={{{1|{{{uri|}}}}}}}}<!-- |
-->}}<!-- end if | -->}}<!-- end if | ||
--></includeonly> | --></includeonly> |
Revision as of 13:42, 6 September 2016
Problem: Semantic MediaWiki
- stores a hashed URL like
[[URL::http://www.w3.org/2004/02/skos/core#]]
- as http://www.w3.org/2004/02/skos/core cutting the “#” off
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
{{Bugfix SMW hased URI|uri=http://www.w3.org/2004/02/skos/core#|property=vann:preferredNamespaceUri}}
Parameters
1= uri= |
(mandatory) uri value |
property= | (mandatory) the property to set |