Module, Plugin

Archived
Forum
(read-only)

Reefine

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From Patrick Woodcock

     

Filter on status?

Support (Resolved)

anchovy
anchovy

Hi

Great addon; thanks.

Is it possible to filter on the status of a entry?
I’m setting the status to return all the entries in the channel:

{exp:reefine channel="classifieds"
   
filter:fields="title|ad_location|ad_email|ad_name"
   
status="Open|Closed|Cancelled|Unapproved|Deleted"
   
....
   

Which works fine - but I’d also like to generate a filter listing these distinct status options so I could get only ‘Unapproved’ entries to be returned.

if I try to add ‘status’ to the filter:fields I’m getting a fatal error.

Can’t seem to see this in action in the documentation or any examples; is this possible?

Thanks in advance.

Ralph
# 1
Ralph

Hi. Thanks, glad you like Reefine. I’m not sure if there is a way to filter by status. I’m on holiday at the moment, I’ll double check this when I get back on the 5th.
Patrick.

anchovy
# 2
anchovy

Hi


Thanks for the reply, even though you are on holiday!

Worked out how to do it, but it involves having different url’s for the different status - so I’ve got:

/segment_1/segment_2/Classifieds
  - /Approved
  - /Unapproved
  - /Cancelled
  - /Deleted


and my code is:

{exp:reefine channel=“classifieds” parse=“inward” method=“ajax” show_expired=“yes” show_future_entries=“yes”
filter:fields=“title”
status=’{if segment_4}{segment_4}{if:else}Approved|Unapproved|Cancelled|Deleted{/if}’
}

So /segment_1/segment_2/Classifieds show’s all the defined status, but /segment_1/segment_2/Classifieds/Approved will only show the approved entries.

I presume that it would be simple enough to get status filters working within the one page view - something like:

status:default="Approved"
status:list="Approved|Unapproved|Cancelled|Deleted"
status:type="list" 

So initially it would default to all entries that have a status of ‘Approved’. But also allow a filter list to be built supplying the other filters. If a different status, or multiple status, is selected, then these would be returned.

status:default="Approved|Unapproved|Cancelled|Deleted"
status:list="Approved|Unapproved|Cancelled|Deleted"
status:type="list" 

In the above, all the entries with any of the specified default status’s would be returned, along with the filter list with all the items selected/checked.

Regards
Ben

Ralph
# 3
Ralph

Hi Ben.

I’m back! I think I can add the entry Status as another field to Reefine. If you could send me an email I’ll send you a beta version for you to try out when it’s done.

Cheers
Patrick.

amadeus
# 4
amadeus

Hi, having the same question. Is entry status filterable with the most actual version of reefine right now?

Ralph
# 5
Ralph

Hi. I’ve just uploaded the latest version of Reefine which supports the “status” in filter fields to devotee.