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

Hans design5 at softflow.co.uk
Tue Jan 29 16:52:41 CST 2008


Tuesday, January 29, 2008, 10:11:22 PM, Randy wrote:

> 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?

The redirect parameter can take a pagename, so the redirect can go to
any page. But Fox expects a target page, even if in the case of
foxaction=display nothing will happen to it.

So you can write:

(:fox redirectform foxaction=display redirect=MyGroup.{$$target}:)
(:input text target size=30:)
(:input submit post "Go to page":)
(:foxend redirectform:)

MyGroup could also be derived as a replacement variable from other
input fields.

One more thing about the redirect parameter:
You can use redirect=... or redir=.... in the (:fox form ... :) markup
But you can only use redir as name in a (hidden) input field.
Fox converts the redirect=PageName to something like

<input hidden name=redir value=PageName />

name=redirect should never be used.

It seems 'redirect' issues have followed me the last two days:
I encountered some strange behaviour working on TextExtract, where
suddenly redirect directives enclosed in code brackets [@ ...@]
became active.... and Fox redirect issues have been appearing a lot.
I hope though we got to the bottom of it.
And thanks for bringing it up!


  ~Hans




More information about the pmwiki-users mailing list