[pmwiki-users] 2.2.0: add Site.SiteHeader and Site.SiteFooter
Martin Fick
mogulguy at yahoo.com
Tue Jun 19 10:58:46 CDT 2007
--- "H. Fox" <haganfox at users.sourceforge.net> wrote:
> > > --- "Patrick R. Michaud" <pmichaud at pobox.com>
> wrote:
> > > > Option 1: A page that acts as a "fallback
> > > > GroupHeader" when a group doesn't have one.
> > > > In this scenario, when viewing a page, we
> > > > first look for a page named GroupHeader in
> > > > the current group,
> > > > if that exists we use it, otherwise we use the
> > > > "fallback" page if it exists.
> > [...]
> > I can't see how to make
> > (:nogroupheader:) work the same in option 2 as it
> > would with option 1. Perhaps I'm just not being
> > imaginative enough there.
>
> I may be missing something.
>
> Can conditional markup be put a site-wide header
> that achieves
>
> Look for a page named GroupHeader in the
> current group, if that exists we use it,
> otherwise use "fallback" markup.
Would this not work?
(:if exists {$Group}.GroupHeader :)
(:include {$Group}.GroupHeader :)
(:else:)
(:include Site.DefaultGroupHeader :)
(:endif:)
> Also, isn't the best way to suppress a group header
> just to not have one? Put another way, what's a
> reason for putting (:nogroupheader:)
> in the site-wide header? It seems like a bad idea
> because it will be confusing when group header
> markup doesn't work.
Well, I believe that the objective is to suppress the
GroupHeader on a specific page in a group but allowing
the GroupHeader to be included in the other pages of
the group.
I was not suggesting that the directives not continue
to be based on core implementations unless this truly
was a goal to eliminate them.
While the directive may no longer work as a
suppressor, certainly similar pagevariable base
solutions could achieve this, couldn't they?
(:if expr exists {$Group}.GroupHeader && equal
{$:nogroupheader} :)
(:include {$Group}.GroupHeader :)
(:elseif equal {$:nogroupheader} :)
(:include Site.DefaultGroupHeader :)
(:endif:)
Simply set nogroupheader to something within a page to
suppress the group header inclusions on that page:
(:nogroupheader:true:)
This seems like it would be possible for Site.Header
also if you don't want to implement a separate
(:nositeheader:)
-Martin
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
More information about the pmwiki-users
mailing list