Writing a basic "OrderBy" filter for an XML Datasource Repeater

Mike Bilz asked on January 27, 2018 00:32

Hello Kentico Team,

I am attempting to create a simple OrderBy filter for an XML Data Source, but the documentation available on the Kentico site isn't especially helpful.

The biggest issue I'm having so far is that the filter I've written doesn't even show up on the page, and if I try to navigate to it directly I get a 404 error.

Is there a step I'm missing to get the site to acknowledge my file? Does it have to be in the CMSGlobalFiles folder? Is it like creating a custom Web Part, where I have to start by clicking on something in Kentico?

Also, if anyone can point to some nice tutorials on creating simple OrderBy filters I would be greatly appreciative.

Thanks in advance.

-mike

Recent Answers


David te Kloese answered on January 29, 2018 10:51

Hi,

have you looked into this step-by-step in the documentation of creating a custom filter?

docs.kentico.com/.../developing-custom-filters

This also includes the part where you register your filter: 'Adding the filter to a portal engine page' You use a Kentico Filter Web Part and point it to your custom file Image Text

You could also create your own Filter Web Part, you might want to look in the Dancing Goat sample site to see Kentico samples.

0 votesVote for this answer Mark as a Correct answer

Mike Bilz answered on January 30, 2018 19:33

Thanks David,

The documentation you mentioned was a little too specific and complicated for my needs.

For anyone having a similar issue, I was able to piece something together using this tutorial on Redigital: http://www.redigital.co.uk/filtering-content-in-kentico/

Though it took a little bit of rewriting to get it to play nice with Kentico 10.

Thanks.

-mike

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.