[pmwiki-users] extract basename

Patrick R. Michaud pmichaud at pobox.com
Sat Apr 12 13:03:37 CDT 2008

On Sat, Apr 12, 2008 at 04:18:41PM +0200, noskule wrote:
> hi list
> I try to build a pagevariable that get's me the basename of a related page:
> related page: Group.Name-Issue-#
> base page: Group.Name

PmWiki has this built-in.  Simply add

    $BaseNamePatterns['/-Issue-\d+$/'] = '';

and then the $BaseName page variable will automatically return
the base name of a page without any -Issue-##### suffix.


More information about the pmwiki-users mailing list