[TYPO3-mvc] Link viewhelper and 'back pid'

Henjo Hoeksma me at henjohoeksma.nl
Fri Oct 1 14:42:35 CEST 2010


On 2010-09-30 18:44:28 +0200, Thomas \"Thasmo\" Deinhamer said:

> Christian Zenker wrote:
>> The best way IMHO would be to store the backPid in a session. I'm not
>> sure how to do that in TYPO3 - but it *could* be an alternative.
>> 
>>> Relying on JS is possible in most cases, but not always. Adding an
>>> extra argument manually is less clean than using a supported argument - ?
>> 
>> There is nothing wrong if you extend the linkViewHelper to a custom
>> viewHelper in your extension! I just fear that the viewHelper becomes
>> another stdWrap with thounsands (of somehow redundant) parameters. So
>> why add another argument if it could as well be done with the standard
>> parameters. I don't see how this should become any easier with an
>> additional parameter. Or am I missing something?
> 
> I totally agree with all you said. I don't like having a separate 
> argument just for being able to set a return page. Furthermore in some 
> situations you need more than a pid. You maybe need an action or 
> another controller or some custom arguments.
> 
> There are two ways I can think of:
> 
> * Store the history in the session object (like history object in JS)
> * Determine the "backPid" based on conditions of current settings.
> 
> Generally those two solutions are those mentioned by Christian already.
> 
> And if you really need a custom URL, you can always use the "arguments"
> array in the link view helper to set a customized URL (urlencoded) and 
> use it later on in an action to redirect back or render a back link.
> 
> JS is imo no solution, just a gimmick (buzzword "unobtrusive JS").
> 
> Regards,
> Thomas

Hey guys,

thanks for the lesson ;-) I do agree. Completely.

Thanks for some reminders ;-)

Henjo



More information about the TYPO3-project-typo3v4mvc mailing list