[pmwiki-users] Redirecting to a change group

StefCT stefct4 at gmail.com
Thu Mar 20 14:12:09 CDT 2014


Hi Simon,

On 03/20/2014 07:24 AM, Simon wrote:

> What I'd like to do is redirect all my pages, viz MyGroup.pagename to
> NewGroup.pagename.
>
> I had the idea of adding the following to Site.PageNotFound
> <http://Site.PageNotFound>
>
> (:if equal "{$RequestedGroup}" "MyGroup":)
> (:redirect NewGroup.{$RequestedPage}:)
> (:ifend:)
>
> The problem is that {$RequestedPage} <http://{$RequestedPage}> returns
> MyGroup.SomePage
> How do I extract, or separate out MyGroup and SomePage

Did you try {(substr ....)} (using the proper lenght of string 
"MyGroup." as a parameter)?

Documentation: http://www.pmwiki.org/wiki/PmWiki/MarkupExpressions#substr

--StefCT




More information about the pmwiki-users mailing list