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.

Linking author ID to custom author template

November 03, 2012 12:23pm

Subscribe [2]
  • #1 / Nov 03, 2012 12:23pm

    scottb

    348 posts

    Greetings. I’m stumped on the following question and can’t seem to find any postings to help.

    I have a series of article authors and want to link their names at the top of each article to a profile of that author on a custom template within the site.

    I assume the author’s name will be a path using that author’s ID. The path goes to a template with the default profile tags such as {bio} along with custom profile tags.

    The path looks like this:

    <a href="http://{path=site/member_profile/{author_id}}">{author}</a>

    But the template only displays my profile, even though the article is assigned to someone else. Any suggestions?

  • #2 / Nov 06, 2012 10:24am

    Shane Eckert

    7174 posts

    Hey scottb,

    Thank you for posting your question.

    Can you show me all your code? Is this in a channel entries tag pair? If it is, the author_id should be correct and not your own.

    This works perfectly for me.

    {exp:channel:entries channel="blogs"}
     <a href="http://{path=member_profile/{author_id}}">{author}</a>  
    {/exp:channel:entries}

    What version of ExpressionEngine are you currently using?

    Thank you,

  • #3 / Nov 06, 2012 10:42am

    scottb

    348 posts

    Hi, Shane. The site is in 1.7 and the path is within the weblog:entries tags.

    The landing page code is:

    {exp:member:custom_profile_data}
    
    <h1>{screen_name}</h1>
    {custom_tag}
    {bio}
    {signature}
    
    {/exp:member:custom_profile_data}
  • #4 / Nov 07, 2012 11:00am

    Shane Eckert

    7174 posts

    Hey there Scott,

    Sorry about that. Did not realize you were on 1.X.

    Please try the following.

    {exp:weblog:entries weblog="blogs"}
     <a href="http://{path=member_profile/{author_id}}">{author}</a>  
    {/exp:weblog:entries}

    Cheers,

  • #5 / Nov 07, 2012 5:34pm

    scottb

    348 posts

    Shane, I should have been more clear. I do use exp:weblog:entries and not exp:channel:entries.

  • #6 / Nov 08, 2012 2:37pm

    Shane Eckert

    7174 posts

    Hi scottb,

    So you are saying that this block of code does not work?

    Did you try it in a new template?

    Cheers,

  • #7 / Nov 16, 2012 8:09am

    scottb

    348 posts

    I figured it out, Shane. In the code, I should have put:

    {exp:member:custom_profile_data member_id="{segment_3}”}

    To capture the ID number in the path instead of just:

    {exp:member:custom_profile_data}

    Scott

  • #8 / Nov 16, 2012 2:26pm

    Shane Eckert

    7174 posts

    Hi scottb,

    Awesome! Glad you figured it out!

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases