How to use XenForo_Helper_Criteria::pageMatchesCriteria()?

Liam W

in memoriam 1998-2020
I'm using the titular function, however I have no way to get the container parameters.

I'm calling this in a template hook callback function, and it doesn't seem to work for nodes. How can I get the container parameters?

Liam
 
I'm using template helper in an add-on and display a list using it.

In php side I want to use pageCriteria to filter the list.

is it possible this way? (this way = using template helper)

in IF I use this:
Code:
XenForo_Helper_Criteria::pageMatchesCriteria($list['page_criteria'], true, $template->getParams(), $containerData)

but I tested lots of things to get the parameters but couldn't make it work in my case.

Thanks
 
anyway, I got what I wanted by changing helper and using get and using callback in template instead of getting info using template helper.

Thanks @Siropu for your great guide. warmly appreciated.
 
Back
Top Bottom