Filter Express Entry list in a template

Permalink
Hi,
How can I filter the result of an Express Entry list in the template? As I see there is this line at the template:
$results = $result->getItemListObject()->getResults();

I tried this, but it results in an error:
$results->filterByName('test');

 
asaternus replied on at Permalink Reply
I need this too!! Anyone?? This question is over a year old.
mnakalay replied on at Permalink Reply
mnakalay
What are you trying to do exactly?
asaternus replied on at Permalink Reply
I'm trying to create a custom template for the Express Entry List block. I'm using the block to show a list of testimonials already restricted to the "testimonial" entity. But, rather than having to enable the search, I was hoping to add a bit of code that would "pre-filter" the list. For instance one of the attributes of the entity is "Category".

So the code looks like:
$results = $result->getItemListObject()->getResults();

Above that line I was trying things like:
$result->filterByAttributeCategory('8'); (8 being the value the search tool uses)
$result->filterByKeywords('Affordable');

The ultimate goal is that we can put this block on any page, "tag" the page using a Custom Page Attribute (which would match the list available in the entity), and when the template is applied, only results matching the "tag(s)" would show. Hope that makes sense. Note, we'd like to be able to add more than one tag, some perhaps a bit more like using keywords.

If I can't figure it out php/concrete, I may just have to filter "after-the-fact" using jquery, but thought this would be cleaner.