1

Here's what I am trying to accomplish in EE 2.5.5. I have 2 channels; blog article and author. The author channel is pulled in via Relationship Field in the blog article channel. I then have the blog pages which correctly display the authors name and link out the the authors profile page, no issues. The issue is that I cannot figure out how to display only that author's blog posts on the authors profile page. In other words I cannot figure a way to filter the list of blog articles by the author relationship field per each authors bio page.

Is there a way to filter relationship fields by the channel entries search parameter? Can I do this with reverse related entries? Can I do this easily with the Playa addon?

Any help is appreciated, thanks!

Edit - here's the code I'm currently using, currently this displays "Some articles: John Doe":

{exp:channel:entries channel="authors" limit="1" dynamic="no"}

{reverse_related_entries channel="blog" orderby="entry_date" sort="desc" limit="100"}

{if no_reverse_related_entries} No Articles {/if}

Some articles:

{article_title}
{article_header_image}
{article_content}
{title}

{/reverse_related_entries}

{/exp:channel:entries}

1 Answer 1

1

Reverse Related entries from the Author channel back to the blog articles channel should work. But, since EE 2.6, the {reverse_related_entries} tag has been replaced with the new Relationships field -- so you'll need to download the older EE 2.5 documentation to see the official examples.

But, basically the reverse related entries syntax, which goes inside your {exp:channel:entries channel="author"} tag in the authors template, would look something like this:

{reverse_related_entries channel="blog_article" orderby="entry_date" sort="desc" limit="100"}
   {if no_reverse_related_entries}
     No Articles
   {/if}
   {title} {!-- this will be the blog article title; add other blog fields here --}
{/reverse_related_entries}
8
  • Your syntax seems to be spot on. I tried this earlier today and had no luck, tried again just now and got the same result. I'm new to EE but this seems like odd behavior. The conditional doesn't pick anything up so it attempts to print the Blog fields but nothing shows up. However {title} actually returns the name of the author.
    – majawi
    Commented Sep 12, 2013 at 2:25
  • @majawi - could you update your original post with your code, including the exp:channel:entries channel="author"} tags?
    – Jay F
    Commented Sep 12, 2013 at 2:45
  • Added to the main post, stripped out the html though
    – majawi
    Commented Sep 12, 2013 at 3:03
  • @majawi that looks right to me. Are you sure that you're getting an author who was blog entries? Are you seeing the "No Articles" result? Make sure you can see some content from other fields in the authors entry.
    – Jay F
    Commented Sep 12, 2013 at 19:42
  • Yea there's only one author at the moment. Nope, the no articles result isn't printing so it thinks it's finding blog articles. None of the blog article fields are printing out, just {title} which is printing the authors name for some reason.
    – majawi
    Commented Sep 12, 2013 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.