[pmwiki-users] Pagelist links to groups without default pages (PITS/00736)

Martin Fick mogulguy at yahoo.com
Mon May 8 16:53:04 CDT 2006


--- Pico <pmwiki at ben-amotz.com> wrote:

> When it comes to pagelist directives, however, there
> is less ambiguity
> when creating links to groups, because we *know*
> that {=$Group} is the
> name of a group, not a page. 

Not really, {=$Group} is meant to mean the group, not
the group homepage, it just happens to also be used
that way in the group template which then causes the
problems that you mention.  But, I would not suggest
changing the semantics of what {=$Group} means since
an author may well want to refer to a specific page
within a group in a pagelisttemplate. i.e.
{=$Group}.Notes


I think that there are two solutions that will give
you  what is really wanted in the group template.  The
first can be implemented by modifying the group
template to have a series of (:if exists:)s such as
(:if exists {=$Group}.HomePage:) ... so that it
mimicks pmwiki's internal group naming resolution. 
Or, the second is to define another variable which
pmwiki resolves internally that will always point to
the proper (existing) group homepage or to nothing. 
i.e. {=$GroupHomePage}

The first one is nice since it does not require a core
modification, but it can get out of sync with the way
pmwiki resolves names (bad if there exists a
Group.HomePage and a Group.Group).  The second on
could have problems when it is blank, but I think that
pmwiki can already handle [[]] specifically for this
reason.  

I would personaly like the second one but hadn't
tought of it until now. :)

-Martin

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the pmwiki-users mailing list