Jump to content

Include=all but exclude unpublished?


a-ok
 Share

Recommended Posts

I am wanting to return all repeater fields, outside of admin, but it seems like you cannot do this without using include=all (even include=hidden doesn't work) but this also includes unpublished pages. Is there a combination to include=all but exclude=unpublished?

  • Like 1
Link to comment
Share on other sites

2 minutes ago, LostKobrakai said:

include=hidden, status!=unpublished,

Keep in mind that include=all will include a lot more than just unpublished pages.

Thanks, I think you meant 'include=all' as this seems to work just perfect...

template=repeater_collections_detail_images, include=all, status!=unpublished

 

Link to comment
Share on other sites

I believe he meant what he has said: " Keep in mind that include=all will include a lot more than just unpublished pages."

If it currently is working for you with include=all instead of include=hidden as suggested by @LostKobrakai, you only need to wait until the first page in your trash will match the selector too. ;):P

  • Like 2
Link to comment
Share on other sites

17 minutes ago, horst said:

I believe he meant what he has said: " Keep in mind that include=all will include a lot more than just unpublished pages."

If it currently is working for you with include=all instead of include=hidden as suggested by @LostKobrakai, you only need to wait until the first page in your trash will match the selector too. ;):P

Bugger. How would you suggest I return my repeater fields then? There is this: http://cheatsheet.processwire.com/page/page-status/page-statustrash-8192/ so perhaps we could do the same status!=unpublished|trash 

Link to comment
Share on other sites

Repeaters are located in /admin so access protected too. So I guess for a not logged in user you wouldn't be able to $pages->find(selector)  the repeater pages. I think then you'd need a "check_access=0" or a "include=all".

Since they're in /admin you could also consider implicit "has_parent=RepeaterParentID" or "has_parent=2" ($config->adminRootPageID) instead of exluding trash somehow.

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...