• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to use XenForo_Helper_Criteria::pageMatchesCriteria()?

Liam W

Well-known member
#1
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
 

Dadparvar

Well-known member
#2
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
 

Dadparvar

Well-known member
#3
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.