ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

show all entries based on author of current entry

November 25, 2014 8:16am

Subscribe [1]
  • #1 / Nov 25, 2014 8:16am

    Eastwood Design

    605 posts

    I have a simple blog displaying a single entry using segment _2 as the url title.

    I want to display a list on this same page that displays links to read other entries by the same author.

    The only way I have been able to do ti so far is by adding the author_id to segment 3 but that is not acceptable to the client.

    Is there an embed method or something else where I can display the other entries from the same author without using a segment to get the author id?

    {exp:channel:entries channel="blog" entry_url="{segment_2}" limit="1" dynamic="yes"}
    {title}
    {content}
    
    Other Entries by {author}
     {/exp:channel:entries}
    
    <ul>
     {exp:channel:entries channel="blog"  limit="12" dynamic="no" author_id="???"}
    <li><a href="http://{title_permalink=blog}">{title}</a></li>
    </ul>
    {/exp:channel:entries}

     

  • #2 / Nov 25, 2014 9:07am

    Eastwood Design

    605 posts

    SOLVED

    using an embed here is the embed:

    {exp:channel:entries channel="commentary" limit="12" dynamic="no" author_id="{embed:author_id}"}
    <li><a href="http://{title_permalink=commentary-test}/">{title}</a></li>
    {/exp:channel:entries}

    Parent page:

    {embed="commentary-test/author" author_id="{author_id}"}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases