[TYPO3-mvc] Reuse arguments in different action

Anja Leichsenring aleichsenring at ab-softlab.de
Mon Dec 1 12:42:32 CET 2014


Hi Jonas,

you can share the namespace between both plugins. Both will then receive 
all the parameters from the other one and you can act as if they are not 
two plugins, but one.

How this works, is described in the wiki: 
http://wiki.typo3.org/Configurable_Plugin_Namespaces

Good luck!
Anja

On 01.12.2014 12:32, Jonas Eberle wrote:
> Hello,
>
> this is a common pattern that I have yet solved in different (hacky,
> workaroundy) ways with Extbase. I'd like to hear your oppinions:
>
> I have 1 plugin that represents a search form and 1 that represents the
> result list. Both need to be aware of submitted search parameters (the
> list because it needs to apply constraints and the search form because
> it needs to reflect current search constraints by prefilling fields).
> They need to be separate because they could be presented in different
> parts of one page or even solo.
>
> How do you 'share' those arguments between 2 different plugins and their
> respective actions?
>
>
> Here is how I did it in recent projects:
> 1) Define a HttpParametersService (just to keep it separate from the
> controller) that does some t3lib_div::_GP($key) to get the variables.
> 2) Just use $_REQUEST directly in the controller to get the key.
> 3) Use AJAX to drive the list (some projects need to be usable without
> JavaScript, so this is not always an option)
>
> Both seems awkward and non-Extbase-evangelical. Everytime I do this I
> crawl the web to find any more elegant solutions...
>
> Any suggestions?
>
>



More information about the TYPO3-project-typo3v4mvc mailing list