Extension, Module

Developer
Supported

PaternitEE

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4

Back to this add-on's main page
View Other Add-ons From Conflux Group, Inc.

     

You must be logged in to post.

Empty parameter value?

General

travisb
travisb

Still playing around with Paternitee, and so far I really like it. It makes using relationships as categories really clean and easier to unravel in templates, and makes ordering and sorting easy with multiple relationships. In my basic tests Paternitee is faster with fewer queries than channel entries + relationships to arrive at a similar place - is that possible? The only drawback for me at this point is that I still need to use native categories when using Store (for discounts / sales), but that’s no fault of Paternitee.

Also, I don’t see a way to include an ‘empty’ value for related fields? That would be nice in order to include all the results that don’t have a relationship selected on a particular field. ie

{exp:paternitee:entries 
 channel
="blog"
 
field:cat_type="102"
 
field:cat_type="__empty__"
 
field:cat_brand="2016"
 
field_type="relationship"
}
 {if no_results}Sorry there are no results
.{/if}
 
<li>{title} {entry_id}</li>
{/exp:paternitee:entries} 
Jeremy Gimbel, Conflux Group, Inc.
# 1
Developer
Jeremy Gimbel, Conflux Group, Inc.

You are correct, at this point there is no way to add a filter for empty values.

Keep in mind that the filters add to eachother, so adding cat_type=102 and cat_type=103 is going to get entries with both 102 and 103, not entries that with 102 and entries with 103. The more filters, the more entries are excluded.

I have a new version ready to go, which I’ll email you shortly.

This adds two features, which may help.

1) a new parameter called results_with_no_filters - this parameter reverses the behavior of the tag when no filters are applied, so that all results are returned instead of no results

2) a new tag called exp:paternitee:entry_ids - this should solve your problem using Store, as you’ll be able to wrap the tag around the Store tag (or any other module) and feed it a pipe-separated list of entry_ids with the variable {entry_ids}. Otherwise it works exactly the same as entries.