Custom Filter

arbab anis asked on March 8, 2018 16:11

Hi team,

i am developing a custom filter where i have a no of drop down which is binding through api call. Now my requirement is i wanted to show the result of filter in another page.

as i follow the kentico document for custom filter, i cant find any way to show filter result in another page. Please help for the issue with details.

Recent Answers


Brenden Kehren answered on March 8, 2018 16:19

Take the values selected in the dropdowns and pass them as query string values.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on March 11, 2018 22:35

it isn't normally passed, a Filter only modifies the WHERE / Order by of the thing it's filtering.

However, there's nothing to say you can't use the MacroContext.CurrentResolver.SetNamedSourceData("MyFilterValue", TheFilterValue) to add your value to the current macro resolver so you can call {% MyFilterValue %} in the page to display whatever you pass to it.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on March 13, 2018 04:36

After re-reading the question, i retract my answer, didn't know you were setting it on the another page. BK's recommendation is correct, pass it in the Query String, otherwise you would have to try to post it and catch that which...really makes no sense to do.

0 votesVote for this answer Mark as a Correct answer

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