[pmwiki-devel] markup order for group headers

marc gmane at auxbuss.com
Tue Jan 30 12:09:07 CST 2007


Patrick R. Michaud said...
> 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?

Array does not exist on the page.

    http://www.auxbuss.com/pmwiki/Main/WikiSandbox

This is consistent with GroupHeader populating the array - and 
displaying the dropdown - after the page.

I've sent you the edit password for the above test site, in case it's of 
any use.

> > > 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:).

Okay. And I confirm that they are on different lines, in all cases.
 
> 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').

Okay. I tried that, but there was no change in behaviour.

> > > 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

Yes, I want to populate the array via GroupHeader for access by the 
dropdown on the page.

> 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.

The same happens on a clean install. But the online test site I gave 
above is very basic too[1]. Try it yourself.

-- 
Cheers,
Marc

[1]

<?php if (!defined('PmWiki')) exit();
$WikiTitle = 'Auxbuss';

$ScriptUrl = 'http://www.auxbuss.com/pmwiki';
$PubDirUrl = 'http://www.auxbuss.com/pmwiki/pub';

$Skin			= 'auxskin2';
$SkinTone 		= 'Red';
$SkinCopyright	= '&copy; 2007 Auxbuss Publications';
$SkinPoweredBy	= $Version;

$DefaultPasswords['admin']  = .....
$DefaultPasswords['edit']   = .....
$DefaultPasswords['attr']   = '@lock';
$DefaultPasswords['upload'] = '@lock';

$EnablePathInfo = 1;
$EnableGUIButtons = 1;
$EnableRelativePageVars = 1;

$GUIButtons .....

$GroupHeaderFmt = '(:include {$SiteGroup}.SiteHeader:)(:nl:)' . 
$GroupHeaderFmt;
include_once("$FarmD/cookbook/auxselect.php");




More information about the pmwiki-devel mailing list