All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Filter by author?

Paul Larson 6 Nov 2019 23:22 question, complete

Low,

I don't need to filter by member data, per se. I was trying to adapt something that already worked for other fitters, but authors are a new frontier.


<span>
Author:
<select name="author:partner_org_profile_bios" onchange="window.location=generateUrl(this)">
<option value="">all Organizations</option>

{exp:channel:entries channel='partner_org_bios' class='clearfix' dynamic="no" sort="asc" order_by="title"}
<option value="{author_id}">{author}</option>
{/exp:channel:entries}
</select>
</span>


This crude test produced this search log:

https://www.dropbox.com/s/tnr855qrjsl...

This filter, for example, works perfectly for searching a State. Just want the same for entry authors.


<span>
State:
<select name="search:partner_org_bio_state" onchange="window.location=generateUrl(this)">
<option value="">all states</option>
{exp:channel:entries channel='partner_org_bios' class='clearfix' dynamic="no" sort="asc" order_by="title"}
<option value="{partner_org_bio_state}">
{partner_org_bio_state}
</option>
{/exp:channel:entries}
</select>
</span>


Been a long day; hope this question makes sense!

Replies

  1. Low 7 Nov 2019 07:25

    You can currently filter by author by using the native filters:

    - author_id, which would accept one or more member IDs,
    - username, which would accept one or more member usernames.

    If you need to filter entries by their author's member data, you'll need Low Search Members.

  2. Paul Larson 7 Nov 2019 23:10

    Low,

    Thanks! I think I'm just tripping over myself with the syntax.


    <select name="search:author_id">
    <option value="{author_id}">{author}</option>


    The search log has: search:author_id=26653 which _seems_ right. Or at least close. (26653 is the proper member id)

    What am I missing?

  3. Low 8 Nov 2019 13:31

    You're trying to apply the Field Search filter's syntax to a native parameter. You can just use the name as is.

    <select name="author_id">

  4. Paul Larson 8 Nov 2019 18:30

    That was it. Thank you!