[TYPO3-mvc] Filter plugin in different Controller / content element

Claus Due claus at wildside.dk
Fri Mar 2 13:12:54 CET 2012


Hi Tim,

> So after this very long post, my question is: how can i separate my search
> form into another content element which i can then place in the backend in
> any location wanted, even on other pages, since i can simply set the
> pageUid=’x’ in my <f:form>.

This is a very open-ended question. There are numerous possible solutions
but I'll sketch you the one I think would work best:

1) Create a ViewHelper that is capable of parsing GET parameters and turn
them into an array (your Demand "object") which can be used in any Fluid
template regardless of wether or not you have a Controller.

2) Use this ViewHelper in your FCE to load the current Demand settings into
your search form fields.

3) In controllers that list the results etc. you do not need to do anything as
long as you make sure that your form sends variables using the correct field
name prefix (tx_myext_pluginname).

I won't go into detail about the other solutions that are possible unless for
some reason you are unable to use this suggestion - but judging from your
email you already have the option of making a ViewHelper for your own
extension and then use that ViewHelper in your FCE.

--
Cheers,
Claus
http://fedext.net



More information about the TYPO3-project-typo3v4mvc mailing list