[pmwiki-users] pagelist is creating links relative to the current group?

Pico pmwiki at ben-amotz.com
Wed May 24 11:49:59 CDT 2006

Américo Albuquerque <aalbuquerque <at> lanowar.sytes.net> writes:
>  > However, the present situation of having a group home inadvertently
>  > link into the current group is worse than nothing, so we need
>  > to fix it.
> The problem is how to know if [[sometext]] is a group name without a 
> page name or a page name without a group name. What if the site had a 
> group called XYZ and a page called Main.XYZ? Wich one would [[XYZ]] link 
> to when used in the Main group? The XYZ group or the Main.XYZ page? We 
> could add a new markup like [[g:XYZ]] to state that we want the XYZ 
> group, not the Main.XYZ page

Actually in the pagelist context, you do know whether "sometext" is a group or a
page name, because the pagelist templates include conditional statements that
structure the pagelist output by group, e.g.

   (:if equal {<$Group}:)               At beginning of list
   (:if equal {>$Group}:)               At end of list
   (:if ! equal {=$Group} {<$Group}:)   First item in group
   (:if ! equal {=$Group} {>$Group}:)   Last item in group

After those conditions, the pagelisttemplate tries to generate links using the
group page variable, e.g. [[{=$Group}]]

See [pmwiki-users] Pagelist links to groups without default pages (PITS/00736)
at http://pmichaud.com/pipermail/pmwiki-users/2006-May/027445.html


More information about the pmwiki-users mailing list