Patrick R. Michaud said... > On Sat, Jan 27, 2007 at 06:28:26PM -0000, marc wrote: > > Markup in group headers (and site headers when enabled) appears to be > > run after markup in PageText. > > > > I'm sure there's a good reason for this, but I'd like to understand why. > > If you're talking about the GroupHeader pages, then no, they're > run at the same time as page's markup. In fact, GroupHeader effectively > works by adding the equivalent of > > (:include GroupHeader:)(:nl:) > > to the beginning of the page text before processing the markup. > (The actual text to be prepended is given by $GroupHeaderFmt.)
Thanks for this Patrick. This doesn't seem to be happening here. At least, I'm probably missing something obvious. Here's a demo: http://www.auxbuss.com/pmwiki/Main/WikiSandbox FYI: In config.php, I have: $GroupHeaderFmt = '(:include {$SiteGroup}.SiteHeader:)(:nl:)' . $GroupHeaderFmt; Although, as I mention below, I've tested this on clean install also. I'm testing this by trying to populate a dropdown on a page with values supplied in either GroupHeader or SiteHeader. The markup calls a function that drops values into a global array (that is then used by the dropdown). So, say, in GroupHeader I have (:auxselectdata test2 1 2 3':) (:auxSelect test2 test2 text='GroupHeader: ':) The first markup basically does: $AuxSelectData[test2] = array(1,2,3); while the second displays the dropdown, populated with $AuxSelectData [test2] That works (in the GroupHeader) and displays above page text, as normal. Now, when I add the same markup to the page (but use, say (:auxselectdata test2 4 5 6':) to distinguish it), the function the markup calls issues an error stating that an existing array cannot be overwritten (I do this as a security measure). But the error is raised within the GroupHeader. This is confirmed by the fact that both the dropdown on the page and in the header contain the population data from the page - 4,5,6 in this case. I can extend this to include SiteHeader and exactly the same thing happens. IOW, the function called by (:auxselectdata:) in the page is being called before both the Group and Site headers. > > As it is, I was hoping to provide some markup to set some values in > > site/group header, but the order stymies this. > > I'm afraid it must be another issue that is causing this. :-) Well, something funky is going on. I tried the same thing on my clean install and exactly the same thing occurs. -- Cheers, Marc _______________________________________________ pmwiki-devel mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
