On 1/31/07, Kathryn Andersen <[EMAIL PROTECTED]> wrote: > On Wed, Jan 31, 2007 at 07:05:08AM -0500, The Editor wrote: > > On 1/30/07, The Editor <[EMAIL PROTECTED]> wrote: > > 2). In the process, the thought crossed my mind we do have two options > > for dealing with hierarchical config files. Currently, if you are at > > Kingdom-Animal-Canine, it looks for Kingdom-Animal-Canine.php first, > > then Kingdom-Animal.php, and then Kingdom.php (and then default.php). > > As soon as it finds one, it uses it and stops its search. So only one > > file is ever used (much like the group attributes pages). > > > > It could be rewritten however (a bit of a pain) to include if it > > exists Kingdom.php first, then include Kingdom-Animal.php and then > > Kingdom-Animal-Canine.php third, each one overwriting any settings in > > earlier ones. This might be more what people expect, and makes some > > things easier. That is, with the current system you have to repeat > > config settings in child config files. I hesitate to do this however, > > as I can it making debugging problems far more complex. And at least > > for starters, we should perhaps keep it simple... > > Yes. the latter is what I would have expected/hoped for with > hierarchical groups, otherwise there doesn't seem much point, since you > don't gain from higher-up settings if you have to repeat them for every > lower-down config file.
Actually, it is hierarchical in the sense if you are in group Test-Main-One, any config settings at Test.php will be incorporated automatically unless Hg finds a closer one at Test-Main.php or Test-Main-One.php. In other words, the question is whether you want to include multiple config files, or just the most relevant one. I can envision it being rather complicated for an admin to keep track of stuff in 4-5 config files all being loaded into a page, rather than just one. The flip side is, you could avoid having to recopy some config settings you want to maintain down a chain over other config files. Does that explain what it is doing any better? Of course, the script could be rewritten to do it this way without too much trouble. Depending on the consensus of the group, I'll make the change. My inclination though is to keep it simpler vs easier. But if there is strong feelings the other way, I'll change it. Just 3-4 extra lines. Not much more I'm especially hoping for feedback from Pm on which option he would prefer, as I'm not sure all the implications of loading multiple config pages into a page. Probably none, but would rather have his green light before committing to this direction. Thanks for the input Kathryn. That's one vote for option 2! Cheers, Dan PS. Does anyone recall if PmWiki normally includes both Group.php and Group.Name.php into a page when both exist, or just the latter? Hg should probably do the same, shouldn't it? _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
