00986: PageVariables substitution in pagelist's (:template defaults

 :)
Summary: PageVariables substitution in pagelist's (:template defaults:)
Created: 2007-10-05 06:59
Status: Discussion
Category: Feature
Assigned:
Priority: 543
Version: 2.2.0-beta63
OS:

Description: As far as I've tried & read the source, it seems that PageVariables substitution/FmtPageName isn't done on pagelist options retrieved from (:template defaults:). As I understand, in the case of regular options, like (:pagelist group={$Group}:), it works because the '' markup is scheduled very early in page processing, and precedes the '(:pagelist:)' directive markup.

I believe it should be a fairly easy change to add PageVariables parsing of the parameters specified in the (:template defaults:) for a pagelist. And if it was done, more options could be moved to the template. A good example what would probably be a very common use is creating a template named '#grouplist', with a default parameter like 'group={$Group}'.

Unless I understand wrongly and that's already possible.


It's not quite as easy as it sounds at first. For one, we should consider not only page variable substitutions, but also markup expressions. In fact, the whole reason I haven't committed on this yet is that I'm looking for a common underlying model to be used for all variable/expression handling in markup -- I don't want to end up with something that works one way in one section and a different way in others.

Also, a default parameter like group={$Group} shouldn't work, because {$Group} should refer to the group of the template page. We'd probably need group={*$Group} so that the template defaults to the group of the currently displayed page.

Pm November 13, 2007, at 08:00 AM


Using group={$Group} as a default parameter could be useful when publishing a cookbook, which converts a whole wiki group to something special, e.g. a blog, calendar. But well, in this case it wouldn't really matter whether we would use that or group=PITS... (February 11, 2009, at 03:55 PM)


This also applied to page text variables not working in defaults or when passed as variables. simon October 13, 2009, at 07:28 PM

And to page list parameter variables simon October 17, 2009, at 05:01 AM