Paul Gillingwater wrote:
> > > One last question: Can I set the style for a page dynamically somehow? I
> > > have an active page of the form /topic/, which uses one style,
> > > and the pages of the form /topic/article123.html should use another
> > > style. Currently I have merged both styles into one style document and I
> > > select the appropiate one with an "if ($flag) {" construction, but this
> > > does not feel right. I would rather like to set the style explicitely
> > > in the piece of code where I handle the argv[] arguments.
> >
> > Can't be done in 1.4. The style is collected as the first part of the
> > page construction process, long before any code is actually executed.
> > The PHP4 implementation probably will be able to do this though, now
> > that I think of it. Anyway, what you could do to get this effect is to
> > have a page /topic/, active or otherwise, with one style, and
> > /topic/article/ (probably active) with another.
>
> Actually, I don't see any reason why the approach I outlined on this list
> a couple of months ago wouldn't work with 1.4 as well. Simply create
> a single style, with several ROOT elements (different names of course)
> like ROOT1, ROOT2, ROOT3 etc. Then use a case statement in
> the top level ROOT, which invokes the appropriate style dynamically.
That will work, and I described that as one of the workarounds. But
technically, selecting an alternate style doesn't work (as opposed to
crafting one style to emulate multiple styles).
Emile
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]