reusing common methods + redirect to current page |
[eluser]fchristant[/eluser]
I'm also using the HTTP Referer. I have a basecontroller class which extends all my controllers. It has this method: Code: function pagerefresh() { Next I can call $this->pagerefresh() from my controllers. I use this often in combination with a message, for example: Code: if ($userid == $imagedata['user_id']) { Some of my views have this code to display the message: Code: <?php I use this mechanism to redirect the user to the current page whilst also displaying a message. I like this because there is no javascript reliance. The HTTP Referer is a dependency, but it is one I have control over, I also rely on it for Cancel buttons.
[eluser]brettalton[/eluser]
This is how I redirect to current page and I think the solution is quite elegant: http://ellislab.com/forums/viewreply/801348/ |
Welcome Guest, Not a member yet? Register Sign In |