Redirect Flash Message

Aayush

Well-known member
Is there a way on XenForo to get flash message when you are redirected from an action to another action?
Or
Is there a way to access the message sent via responseRedirect?

Thanks
 
I've never actually seen in XenForo's code the $redirectMessage of the renderRedirect mehtod on the abstract ViewRenderer ever used. The docblock states "* @param mixed Redirect message (unused by some redirect methods)" which to me basically suggests it's completely unused. I can't see that the message is used anywhere in the codebase and the XenForo_ControllerResponse_Redirect's redirectMessage property is only ever read in the FrontController class and passed to the
renderRedirect method on the ViewRenderer.

tl;dr I don't think you can get access to this short of overriding the renderRedirect method on the XenForo_ViewRenderer_Abstract class and writing your own implementation that does actually use it.

It's not clear on first glance that the property isn't used and I've wasted a few minutes trying to figure out how to access the message from a template myself. Of course, I'd normally have referred to development documentation for more information but oh .. I forgot, there isn't any.
 
Top Bottom