[TYPO3-mvc] Passing filters by array or custom object? Which is the better approach?
David Schreiber
flashmasterdash at gmail.com
Mon Jan 11 15:27:02 CET 2010
Hello Franz,
well imagine following case:
A user browses the products available. First he gets a large list of
all the items available, without some filters applied.
Now he clicks on one of the many filter criterias available, lets say
he clicks on a tag called 'Wooden Stuff'.
The page reloads and displays now the items which are tagged with
'Wooden Stuff'. Now he want's to show these items, but only the ones
which are cheaper than 100. Again he clicks on 'Price below 100'
and the page reloads. Now he sees all the 'Wooden Stuff' items which
cost less than 100.
In this example I call the view action three times:
First time: The view action is called without any filter-arguments at
all. It shows every product available.
Second Time: The view action is called with an filter option for
products tagged with 'Wooden Stuff'
Third Time: The view action is called with two filter options. The tag
'Wooden Stuff' as well as the 'price below 100' option.
Inside my view action I call an appropriate query of my repository,
which returns me only the products which match my filter options.
I don't know how to realize that, without calling the view action
passing it the options chosen by the user. My question is how to pass
them.
Thank you,
David Schreiber
More information about the TYPO3-project-typo3v4mvc
mailing list