XF 2.0 What does <xf:redirect /> do in admin templates?

Jaxel

Well-known member
Licensed customer
I see this a lot in admin templates... What does it do? Is it needed?
 
It looks like it adds a hidden _xfRedirect input. It seems like you can pass a URL to redirect to, use the referrer with an optional fallback, or leave it blank to default to the current page. I think it's useful if you want to set the redirect target in the template for whatever reason, such as for refreshing/redirecting from an AJAX submission that can be submitted from a variety of places (ie overlay forms). It can be used from the front-end too.
 
Last edited:
Back
Top Bottom