Last modified: 2014-03-28 10:15:20 UTC
Actual problem in SemanticMaps, but decision should be made on SemanticMediaWiki level; so I am setting `Component' to `SemanticMediaWiki'. Later we can change it to `SemanticMaps'. > {{ #ask: ... > | mainlabel = - > | ?Waypoint id > | ?Location no > | ?Location title > | ?Coordinates > | ?Description > | format = ol (or `ul' or `template') > | template = test > }} Template `test' receives arguments: 1 = Waypoint id 2 = Location no 3 = Location title 4 = Coordinates 5 = Description If I change format to `map', template `test' receives arguments: 1 = Location no 2 = Location title 3 = Description This makes switching between different type of representation quite hard. I strongly believe template should receive the exactly same list of positional arguments regardless of used format. I know that `map' printer handles Coordinates and passes to template two named arguments `latitude' and `longitude' -- that's completely ok; but I do not see reason for changing positional arguments. If you agree with idea that template should receive the same list of positional arguments regardless of format, I will try to prepare a patch.
Changing this would break compat. I think having named params instead if a better way to go.
> Changing this would break compat. I knew it. To my taste it is better to fix and document it, rather than maintain undocumented behaviour. But you decide.
Created attachment 9562 [details] Implementation of the named args. Initial implementation of the named args. There is still work to do. Named args in `ol'/`ul'/`template' formats depends on printout statement: `?Property' causes argument to be a link, while `?Property#' causes argument to be plain text. In `map' format, argument always plain text, which is not good. It should depend on printout to behave similar to other formats.
> `?Property#' causes argument to be plain text This is behavior I'm actually not really familiar with. I do suspect that it is not applied consistently at all, and might only be implemented correctly in the list printers.
If this till occurs, please refile at https://github.com/SemanticMediaWiki/SemanticMaps/issues or https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues