[TYPO3-mvc] Creating a dynamic back-button for error page

math5005 at gmx.de math5005 at gmx.de
Wed Aug 10 06:41:09 CEST 2011


Hi all,

I'm currently working on my first extension for Typo3 (+first time usage of Typo3 + first time programming PHP ;-) ). It's almost finished and working flawless (more or less) but there's one thing that came up yesterday:

When I run into an error (i.e. I catch an exception thrown by an external script that's used to do most of the work) I redirect to my error-action and display my exception message (via flashmessage). So far so good.

What I would like to do now is display a back button that links back to the previously called action:
ActionA -> view ActionA ->ActionB -> exception / error view (because something went wrong inside the script called by ActionB) -> link back to ActionA.

The problem is that you can get redirected to the error page from several actions so I can't use some kind of static link. And I can't use the (as it seems to me) dirty way of simply doing a javascript history.back because some actions need to realy reload when going back to them, so I need everything that was in the get-parameters for this action (ActionA above). Is there a referer stored somewhere that I could use?

Thanks for your help.


More information about the TYPO3-project-typo3v4mvc mailing list