On 05/23/2012 01:57 PM, Daniel Kinzler wrote:
So, you prefer a solution where the item to use is
specified by id whenever a
property of that item is to be accessed? In that case, I'd indeed prefer
{{#property:population|item=id/q12345}}
A possible solution would be to assign local names to
items:
{{#item:thingy|item=id/{{{item-id|*}}}}
{{#property:population|item=thingy}}
What do you think?
I don't really like this global variable business at all. Much of the
ugliness above disappears when the id is mandatory:
{{#data:{{id}}|color}}
or (if you prefer):
{{#data:color|{{id}}}}
If it is missing, simply display an error and let the user fix it.
Cache invalidation can be precise by usage (not necessarily the entire
page) and correctly handles multiple data items per article. The system
is also directly compatible with Lua and Parsoid.
Gabriel