processwire / processwire-requests

ProcessWire feature requests.
39 stars 0 forks source link

Find pages by Publish status (published|unpublished) using Lister / ListerPro #476

Closed klor closed 1 year ago

klor commented 1 year ago

Short description of the enhancement

As an editor working with published / unpublished pages, I want to find unpublished pages (as well as published pages) using Find so that I can easily identify unpublished pages that I'm working on and need to finalize so they can be published. Currently, it seems I can Find pages by Published Date.

Optional: Steps that explain the enhancement

  1. Go to Find at /processwire/page/lister/
  2. "What pages to show:" (I can only choose Published date - Lister has a "Published" filter but only allows specifying a date).

Why would the enhancement be useful to users?

Optional: Screenshots/Links that demonstrate the enhancement

image

Version:

adrianbj commented 1 year ago

Try this:

$this->wire()->addHookBefore('ProcessPageLister::getSelector', function($event) {
    $event->object->allowIncludeAll = true;
});

together with this in the Lister config to allow hidden and unpublished.

image
ryancramerdesign commented 1 year ago

You can find unpublished pages by selecting "status" as the field, and then selecting "unpublished".

On Fri, Jan 20, 2023 at 12:59 PM klor @.***> wrote:

Short description of the enhancement

As an editor working with published / unpublished pages, I want to find unpublished pages (as well as published pages) using Find so that I can easily identify unpublished pages that I'm working on and need to finalize so they can be published. Currently, it seems I can Find pages by Published Date. Optional: Steps that explain the enhancement

  1. Go to Find at /processwire/page/lister/
  2. "What pages to show:" (I can only choose Published date - Lister has a "Published" filter but only allows specifying a date).

Why would the enhancement be useful to users?

  • Being able to Find unpublished stuff is nice.

Optional: Screenshots/Links that demonstrate the enhancement

[image: image] https://user-images.githubusercontent.com/129573/213773254-4529eab7-b927-443f-a490-a9e0938f3ccf.png

Version:

  • Installation 1: ProcessWire 3.0.200, Lister v0.2.6 β
  • Installation 2: ProcessWire 3.0.200, ListerPro v1.1.3 β

— Reply to this email directly, view it on GitHub https://github.com/processwire/processwire-requests/issues/476, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACQEUG6QXCLDUJN7XSMWRDWTLHB3ANCNFSM6AAAAAAUBZL5HQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

klor commented 1 year ago

@ryancramerdesign - Of course.. :-) @adrianbj - That's a handy code snippet that I'll keep in mind. Thank you, Ryan and Adrian for your fast, competent, and friendly support as always..

adrianbj commented 1 year ago

@klor - IIRC, that hook is necessary if you're trying to make this available to non-superusers because they just can't use the status = unpublished option.