-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance #set: parser function with display option #5624
Comments
@cscott - I just rewatched your presentation at MWCon. This issue mentions some places where the #set parser function is not yet a replacement for the inline annotations |
The first question coming up to mind is how does this work with a LUA combo? |
Why not using https://www.semantic-mediawiki.org/wiki/Help:Setting_values/Working_with_the_template_parameter
and a template with
|
It might be a disadvantage for performance if you always have to use template inclusion in every property annotation. |
Since the
#set:
parser function is not a 100% replacement for the inline annotation[[Foo::Bar]]
, we should need to move forward in this direction. Therefore I propose to add a display functionality to the parser function.Background
In this issue, I am not referring to the problem of SMW installations that generally use the inline annotation to annotate content in wikitext using the wikitext editor. For this, see #4727
In the use case I am addressing, semantic values are set in a template, which is the general use case for many SMW installations. It is generally not a problem to avoid inline annoations in templates:
Instead of putting
Your Property: [[Foo::Bar]]
in your template (maybe for a fact box of a wiki article), it is easy to do something likeYour Property: {{{Bar|}}}{{#set:Foo={{{Bar|}}} }}
This approach also has the advantage, that in your template you can control the output of the value
{{{Bar|}}}
anyway you like and set the property with the silent{{#set:Foo={{{Bar|}}} }}
annotation.Problem
The problem, however, is that in the set parser function is not a complete replacement for the inline annotation. These are some cases (there are certainly more):
[[{{{Bar|}}}]]
in the template. This will render an internal link instead of the link to the external URI.[[Your Property::@@@]]
Solution
It should not be very hard to add a display option to the #set parser function. Basically it is something like combing #set and #show.
Suggested syntax:
Other options:
This approach would also enable backwards-compatibility, because if the option is omitted it can default to "+display=no" which does not change the current behavior.
I am interested to hear what others think about this.
The text was updated successfully, but these errors were encountered: