Dynamically Alter an each loop using a search box

I created a functionality where I can dynamically change the returned results of an each statement by creating a search box and iterating over the filtered helper.

I am trying to extend this into a package, and I am having issues getting Template.dynamic , and Template.contentBlock working. When I use a content block I am passing a filterId and a collection to the template.

However when I try to loop through the results are not being passed.

Any advice will be great.

maybe code or link to package would help.
you can publish it to atmosphere without be searchable there.