[pmwiki-users] How to redirect to a user-chosen page

Randy randy at brownragfilms.com
Tue Jan 29 16:11:22 CST 2008


Hans,

Actually, I want to redirect the user to a specific group, not to the  
current group. And I don't want the user to have type the group. I had  
already changed the line to

(:input hidden urlfmt pmwiki.php?n=MyGroup.{$$target}:)

I like your fix in principle. Can you suggest another way to specify  
the group?

Randy


On Jan 29, 2008, at 3:47 PM, Hans wrote:

> Tuesday, January 29, 2008, 8:53:52 PM, Randy wrote:
>
>> What you suggested worked with a little adjustment (I'm not using
>> cleanURLs). For those who wish to try, this worked for me:
>
>> (:fox redirectform foxaction=display redirect=1:)
>> (:input hidden urlfmt pmwiki.php?n={$$target}:)
>> (:input text target size=30:)
>> (:input submit post "Go to page":)
>> (:foxend redirectform:)
>
> I was not happy with this urlfmt hack.
> It should have worked without it, but it didn't.
> So now I updated fox.php so it will provide a correct urlfmt
> when redirect is set.
>
> New update at: http://pmwiki.org/wiki/Cookbook/Fox
>
> So now you can write your form like this:
>
> (:fox redirectform foxaction=display redirect=1:)
> (:input text target size=30:)
> (:input submit post "Go to page":)
> (:foxend redirectform:)
>
> That is quite a short redirect form.
> if no Group is given as part of target, the current group will be
> used. If the page does not exist, you will  be invited to create it.
>
>
>  ~Hans
>




More information about the pmwiki-users mailing list