Best practise for placing filter/pagination to use with multiple templates



where would you place filtering / pagination function if it should be used in multiple templates with different routes / data?

At the moment i have it in application controller. But i´m not sure if it is the best approach.

Component doesn´t seem to be an easy option. Dynamic properties in a #each doesn´t seem to be possible. -> {{name}} would have to be a variable and the template should set the name.

thanks for your input