Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Filtering search/repeater View modes: 
User avatar
Member
Member
Jon White - 11/13/2013 9:17:59 AM
   
Filtering search/repeater
Hi there,

I'm still trying to find my way around Kentico, I have information brought in from a repeater which displays in one list, but i want to be able to tick a box/select a dropdown to filter them.

How would i go about doing this, am i using the wrong thing (a repeater)?

Basically i don't know how to implement filtering (it seems a bit complex - I'm using portal engine).

The same goes for search, how would i add tick box/drop down filters to narrow the results down? Should i implement categories? I'd like to do it based on fields from the document type.

An example would be a list of staff, they'd be from various departments, in the document type i'd have a field with a drop down list to select which department i.e. finance.

Then i'd display all staff on a page (currently by using a repeater), but either have a drop down or search that would let me show only staff from the department chosen i.e. finance.

I hope that makes sense!

Thanks in advance
Jon

User avatar
Member
Member
vcarter - 11/13/2013 10:20:37 AM
   
RE:Filtering search/repeater
You will need to create a filter user control. You will then use this control to change the WHERE clause of your listing webpart. I think a basic repeater has a filter option.

Custom Filters

That article explains this process and also links to code samples. It's really not too difficult once you get the basics.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 11/13/2013 10:54:50 AM
   
RE:Filtering search/repeater
Check out the Smart Search Filter webpart and see if this will work for you. Otherwise vcarter is correct, a custom filter would be the way to go.

User avatar
Member
Member
Jon White - 11/13/2013 11:25:37 AM
   
RE:Filtering search/repeater
Hey thanks for this I was just about to reply, I have been playing with the smart search filter and this seems to be what i need (mostly).

My issue is how i program it to filter by doc type field data.

I assume the value field needs something like:

fieldname; finance; Finance department

So in a staff list i'd have my doc types with 'jobtitle' as a field with drop down selection.
i.e. IT, Finance, HR etc..

I just don't know what to put in the value field in the search filter.
Would it be:

jobtitle; finance; finance department
jobtitle; IT; it department
jobtitle; HR; Human resources

or something like:

fieldname:jobtitle;finance; finance department?
So that would give me 3 check boxes with options to filter by field data.

This resource is useful but doesn't say about using doc type field data (or i'm confused)
http://devnet.kentico.com/docs/devguide/index.html?smart_search_filter.htm

Thanks

Jon







User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 11/13/2013 2:50:06 PM
   
RE:Filtering search/repeater
Jon,

Check out the dev docs on the Smart Search Filter, should get you where you need.

Brenden