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.

member_id/logged_in_member_id as author_id

May 03, 2010 5:22pm

Subscribe [3]
  • #1 / May 03, 2010 5:22pm

    Eric Barstad

    198 posts

    I’ve been trying a couple different methods of returning all entries from a weblog written by a specific author and can’t seem to do it.

    First, I tried:

    {exp:weblog:entries weblog="orders" disable="categories|category_fields|custom_fields|pagination|trackbacks" author_id="{member_id}" dynamic="off"}
       {title}
    {/exp:weblog:entries}

    but that didn’t return any entries.

    Then I tried an embed:

    {embed="some/template" some_id="{member_id}"}
    {exp:weblog:entries weblog="orders" disable="categories|category_fields|custom_fields|pagination|trackbacks" author_id="{embed:some_id}" dynamic="off"}
       {title}
    {/exp:weblog:entries}

    but again, I’ve had no luck.

    The embed variable definitely gets passed; if I just put {embed:some_id} in my template, the value gets returned. Or, if I hardcode the ID into either the embedded template or the embed tag, proper results are returned. However, I can’t seem to get my embed to work with the weblog entries tag itself.

    Any tips?

  • #2 / May 03, 2010 5:30pm

    Max Lazar

    341 posts

    did you try CURRENT_USER

    {exp:weblog:entries weblog="orders" disable="categories|category_fields|custom_fields|pagination|trackbacks"  author_id="CURRENT_USER" dynamic="off"}
       {title}
    {/exp:weblog:entries}

    ?

  • #3 / May 03, 2010 5:34pm

    Eric Barstad

    198 posts

    Awesome, thanks! I didn’t know about CURRENT_USER.

  • #4 / May 03, 2010 5:39pm

    Max Lazar

    341 posts

    no problem - I have the same problem couple months ago when do the same task - order list 😊 But in my case I overreach myself - turned on weblog’s sql request caching before, and after that forget about it and always have the incorrect orders list 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases