Jump to content
jonatan

How to get deactivated / turned off repeater items?

Recommended Posts

Hi! 🙂 

I tried searching for this, but couldn't find anything on on it...

How can I get the deactivated / turned off repeater items? Why? Because I want to use it as an "archive" function, so that the toggle-off makes them show up under "previous events", and when toggled-on they'll show up under "Current events"

32271829_Skrmbillede2020-04-10kl_06_12_51.thumb.png.a3fcdb3890216e7a5c2088abb731941e.png

 

All the best, Jonatan.

Share this post


Link to post
Share on other sites

7fnWMJn.png

Here "content" is my repeater matrix field. See the first dump - it shows the selector used. If you take that selector you get all items (including unpublished). If you do a status>1 you'll get all that are not regularly published (means hidden etc). Doing status>= Page::statusUnpublished would show only unpublished items (not sure if that makes a difference to status>1).

And I'm also sceptical if repeaters are the best option here compared to using regular pages 🙂 

  • Thanks 1

Share this post


Link to post
Share on other sites

Awesome @bernhard! You're the man! 😃

The find (include=all) did it. Worked perfectly! Thank you so much!!

I had no idea about the d() debug function! So extremely useful! Once again so very impressed by PW's enjoyable logic!

  1323847981_Skrmbillede2020-04-10kl_15_19_53.png.4569b86fb38abd138a67405389215ced.png      1308916237_Skrmbillede2020-04-10kl_15_14_44.thumb.png.3a207b05296ddeeefcd20c3df7d8c01e.png

  643042535_Skrmbillede2020-04-10kl_15_12_41.thumb.png.6febe52cab31d2e9a7d899d0479ba81f.png      1903967911_Skrmbillede2020-04-10kl_15_12_33.thumb.png.d74b86d40b0eedb45938ef05d0c203bf.png

 

All the best,

Jonatan

Share this post


Link to post
Share on other sites
6 hours ago, bernhard said:

And I'm also sceptical if repeaters are the best option here compared to using regular pages 🙂 

What's your concern? 😄 

Share this post


Link to post
Share on other sites
1 hour ago, jonatan said:

I had no idea about the d() debug function!

You can use d() from a template file like you are doing in that screenshot, but you might find it cleaner to use bd()  AKA "barDump" in that situation so that the dumps are shown in the Tracy bar. The main time I use d() is in the Console panel like in Bernhard's example.

  • Like 1

Share this post


Link to post
Share on other sites
44 minutes ago, adrian said:

You can use d() from a template file like you are doing in that screenshot, but you might find it cleaner to use bd()  AKA "barDump" in that situation so that the dumps are shown in the Tracy bar. The main time I use d() is in the Console panel like in Bernhard's example.

Thanks @adrian😄

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...