[pmwiki-devel] markup order for group headers

Patrick R. Michaud pmichaud at pobox.com
Mon Jan 29 15:08:55 CST 2007


On Mon, Jan 29, 2007 at 08:44:46PM -0000, marc wrote:
> Patrick R. Michaud said...
> > > Now, when I add the same markup to the page (but use, say   
> > > (:auxselectdata test2 4 5 6':) to distinguish it), ...
> > 
> > How is this second one "distinguished" from the first?  To me they
> > look as though they are both doing the same thing -- i.e., setting
> > values for $AuxSelectData.
> 
> Yes, they are. I used that as an example of showing that the page markup 
> function was being performed before the group header markup function. 
> There is no useful purpose in doing this other than as a debugging aid.
> 
> The reason is that, ultimately, I would like to populate the array in 
> the Site or Group Header prior to displaying the dropdown on the page.

There shouldn't be any problem with doing this.  What happens if you
populate the array only in the SiteHeader or GroupHeader, as opposed
to multiple places as you're doing now?

> > What's the value of the $when parameter that is being used
> > for the (:auxselectdata:) markup?  That's critically important here.
> 
> (:auxselectdata:) is 'inline' whereas (:auxselect:) is '<directives', 
> since it outputs directives.

In the general case, 'inline' is processed after 'directives'.  If
the (:auxselectdata:) and (:auxselect:) markups are on different
markup lines then it probably doesn't matter (because this
occurs after the line split), but if they're on the same line then 
it means that the (:auxselect:) markup is being processed before
(:auxselectdata:).

In general if there's a known relationship between two markups,
then one should specified relative to the other (e.g., have
auxselectdata be specified as '<auxselect').

> > And if the (:auxselectdata:) directive is processed before
> > (:include:) directives are processed, then yes, the page's values
> > will be evaluated first, followed by the group and site values.
> 
> Where in the order of things are (:include:)s processed?

(:include:) is processed fairly early in the sequence -- before
the 'split' rule, so if auxselectdata is specified as 'inline'
it's happening after the includes take place.  This is what I think
you want here, but it still doesn't explain why the values are
showing up the way they are.

Any chance that some other recipe or customization is pre-processing 
the markup in the page text before PmWiki's standard HandleBrowse 
gets to it?  That might explain why it looks as though the
page is being processed before the GroupHeader or SiteHeader.

Pm



More information about the pmwiki-devel mailing list