3068 Posts in 868 Topics by 650 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 956 Views |
-
Filtering Pages on multiple many-many related DataObjects

9 April 2011 at 10:11pm
Hi,
I'm having problems with filtering Pages on their many-many related DataObjects.
I have a CompanyPage. Each CompanyPage has a many-many relation with four DataObjects (Levels, Products, Markets, Competences).
In the CompanyHolderPage I would like to have a combined filter for these DataObjects, where the user can choose a combination of levels, products, markets and competences and the output will be a list of the corresponding pages for which this is true.
Does any one have any example code or a hint in the right direction?
Thanks,
Felicitas
-
Re: Filtering Pages on multiple many-many related DataObjects

18 April 2011 at 7:09am
This is not the right way - but I've used it as it is quick and easy...
class MyModelAdmin_CollectionController extends ModelAdmin_CollectionController {
function getSearchQuery($searchCriteria){
$query = parent::getSearchQuery($searchCriteria);if ($this->modelClass == 'MyModel'){
$query->where[] = ''; //ADD YOUR SQL HERE, using stuff from $searchCriteria
}
}
} -
Re: Filtering Pages on multiple many-many related DataObjects

27 April 2011 at 7:46pm
Thanks for your reply. Maybe this is the right direction. Right now I have four dropdown boxes, one for each dataobject, but not a combination of them.
| 956 Views | ||
|
Page:
1
|
Go to Top |


