Jump to content
Mr. NiceGuy

pages->find() subfield template doesn't work

Recommended Posts

I have added a page reference field to my users and there all contributions that user has made are listed. (they are programatically added via the api).

I am wondering why the first of these queries works (returns the two pages with ids 1083,1130), whereas the second one does not return anything. The pages both have template 'mytemplate'. Is template not supported as a subfield?

$uList = $this->pages->find('template=user, roles=login-register,  contributions.id=1083|1130, contributions.count>0, limit=10,sort=-created, check_access=0');

 

$uList = $this->pages->find('template=user, roles=login-register,  contributions.template=mytemplate, contributions.count>0, limit=10,sort=-created, check_access=0');

 

Share this post


Link to post
Share on other sites
contributions.template.name=mytemplate

Maybe add the name subfield? Wild guesss only!

  • Thanks 1

Share this post


Link to post
Share on other sites

That was it! Thanks!  

Probably xxx.template would match the id of the template but I didn't check that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...