Get content nodes based on multiple content picker filters umbraco 7
I have a document type called Career Item which contains some properties and 2 content pickers. one is for selecting a type of career: eg. Driver, the other one is for selecting a branch where the career will be placed: eg. Ghent Belgium.
My Career types and branches are located in a seperated Content repository, this means they do not have a template, its just a document with properties that can be used on several content pages.
I have created 2 filters for this and with some jQuery I managed to set the url based on the selection to get urls like:
Here you have f which contains the Career type Ids, and b which contains the Branch Id.
Now in my razor I am doing the filtering of the content nodes based on the selection but its quite messed up.
// Collect values for branch and function from the url querystring to perform filtering
var branch = umbraco.library.RequestQueryString("b");
// eg: 1085,1082 from example url above
var function = umbraco.library.RequestQueryString("f");
Am I missing something here and could this be simplified? Because now its only 2 filters, but what if i have 5 or 6 filters, then this is not workable...
Hii ,
Could anyone provide me solution for filter based data show .
like I want to create a filter for destination list in which i wan to filter destination from region and country based .
when I create another package then list of package overide another page at old region page . how can manage filter on this . please provide anybody solution for this .
Get content nodes based on multiple content picker filters umbraco 7
I have a document type called
Career Item
which contains some properties and 2 content pickers. one is for selecting a type of career: eg. Driver, the other one is for selecting a branch where the career will be placed: eg. Ghent Belgium.My Career types and branches are located in a seperated
Content repository
, this means they do not have a template, its just a document with properties that can be used on several content pages.I have created 2 filters for this and with some jQuery I managed to set the url based on the selection to get urls like:
Here you have
f
which contains theCareer type
Ids, andb
which contains theBranch
Id.Now in my razor I am doing the filtering of the content nodes based on the selection but its quite messed up.
// eg: 1075,1076 from example url above
Am I missing something here and could this be simplified? Because now its only 2 filters, but what if i have 5 or 6 filters, then this is not workable...
/Michael
Hi Michael,
If you are using the Multinode-Treepicker data type the take a look at the documentation for this.
https://our.umbraco.org/documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Multinode-Treepicker
Hope this can help you to achieve what you want.
/Dennis
Hii , Could anyone provide me solution for filter based data show . like I want to create a filter for destination list in which i wan to filter destination from region and country based .
-My Probelm is here link - http://srecorder.com/s/12wgo
when I create another package then list of package overide another page at old region page . how can manage filter on this . please provide anybody solution for this .
is working on a reply...