[pmwiki-users] Discuss/talk link help

Ian MacGregor lists at imacgregor.com
Thu Jul 26 00:58:16 CDT 2007


> Maybe try something like
>
> $pagename = ResolvePageName($pagename);
> if (preg_match('!^(PmWiki|Test|Profiles)\\.!', $pagename)
>
>   || preg_match("!^$SiteGroup".'\\.!', $pagename)
>   || preg_match('!\\.(GroupHeader|GroupFooter|GroupAttributes|WikiSandbox)$
>   ||!',
>
> $pagename)
>
>   || preg_match('/^(print|refcount)$/', $action)) {
>
>   $NoTalkPage = 1;
> }
>
> and then switch to
>
> (:if name *-Draft :)(:else if enabled NoTalkPage:)
> (:else if name *-Talk :)
> * %item              class=browse    %[[{*$BaseName} |''Discuss'']]
> (:else:)
> * %item              class=browse    %[[{*$FullName}-Talk | Discuss ]]
> (:if:)
>
> If this is acceptable it should be refined and added to the recipe page.
>
> Hagan
Well, I went ahead and put the discuss links (the (:if:)(:else if:) statements 
on $group.GroupFooter and used (:nogroupfooter:) in pages where I don't want 
the links displayed. This seems to be easiest for me and works fine.
Thank you, Hagan, for dedicating a page to Cookbook/SimpleDiscussLink :)
I do feel that this recipe page is quite useful and it should have its own 
link on Cookbook/Cookbook so others can find it easily.

Thanks again.

Regards,
Ian MacGregor
-- 
http://www.imacgregor.com
MacGregor Despite Them!



More information about the pmwiki-users mailing list