Last modified: 2011-01-23 16:50:27 UTC
If you #ask for a certain property from a certain page, no default text is shown if the page exists but doesn't carry that property (default text is only shown when no pages are returned). i.e. page X does not have the property y, the following returns blank: {{#ask: [[X]] | ?y | default = can't see me}} This may be well and good for #ask, but it means that #show will never show the default text (assuming it's page exists), which seems strange. Do we need a default-per-property syntax? {{#ask: [[X]] | ?y = The value of y # y is undefined}} or something like that?
Yes, I think that this is probably best addressed by a default value for property printouts in queries. Using the existing printout parameter syntax, the appropriate way of supporting this would be {{#ask: [[X]] | ?y |+default=No values for y | ?z |+default=No values for z }} Unfortunately, printout parameters are not currently supported by Special:Ask. It is also not so clear how this would fit into the internal architecture regarding datatypes. Some formats like timeline expect Type:Date properties to return dates, but the default value would probably rather be a Type:String value. If these two issues can be addressed, it seems like a useful feature to implement.