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.

Display weblogs based on member -- Possible?

January 10, 2012 12:39pm

Subscribe [2]
  • #1 / Jan 10, 2012 12:39pm

    jeramiah

    301 posts

    We want to create weblogs of information on members.  But I want the ability to pull up a member and have all weblogs tagged with his name to appear on his page only.  Is that possible?  Did I explain that without confusing you?

    I would imagine something like this where the username is being passed through the URL in segment 3.  Using Solspace’s user module I came up with something like this but it’s not working.  Is there a way in EE’s native functionality to accomplish this?

    When I select John Doe from a jump menu, it goes to a page with this code and should pull in only weblog information associated with John Doe.
    
    URL: <a href="http://www.mysite.com/index.php/site/memberresults/John">http://www.mysite.com/index.php/site/memberresults/John</a> Doe
    
    {exp:weblog:entries weblog="memberhistory" }
    
         {exp:user:stats username="{segment_3}"}
    
                 {entry_date format="%F %j, %Y "}          
                 {title}
    
                 {body}
    
         {/exp:user:stats}
    {/exp:weblog:entries }
  • #2 / Jan 10, 2012 3:34pm

    Rob Allen

    3114 posts

    You need to make sure it’s the username in the URL not the screen_name:

    If you have http://www.mysite.com/index.php/site/memberresults/johndoe then the following should work…

    {exp:weblog:entries weblog="memberhistory" username="{segment_3}"}
    {entry_date format="%F %j, %Y "}          
    {title}
    {body}
    {/exp:weblog:entries}
  • #3 / Jan 10, 2012 5:13pm

    jeramiah

    301 posts

    But wouldn’t that just pull in the weblogs assigned to the currently logged in user with the username in segment 3?

    My understanding of the

    username=

    parameter in the weblog declaration was that it pulls in member data on the logged in member.  So this would be helpful if I were pulling in information from a weblog specific to that member.  But I want an administrator to view the information in that weblog for the user defined in segment 3.

    So I took a look at the docs and found the “search:field_name=” feature.

    The “search:” parameter allows you to constrain Weblog Entries output based on content within your custom fields.


    I’ve tried doing something like this to no avail:

    {exp:weblog:entries weblog="memberhistory" search:name="{segment_3}"}
    
        <h3>{title}</h3>
    <p>CUSTOM FIELD --> {name}<br />
        {body}<br />
        <br />
    {/exp:weblog:entries}

    Actually just shows nothing.  Additionally, using the username= parameter where the username is segment_3 yields nothing:

    {exp:weblog:entries weblog="memberhistory" username="{segment_3}"}
    
        <h3>{title}</h3>
    <p>    {name}<br />
        {body}<br />
        <br />
    {/exp:weblog:entries}

     

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

ExpressionEngine News!

#eecms, #events, #releases