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.

Recent Comments: Comment Permalink

October 03, 2008 9:09am

Subscribe [3]
  • #1 / Oct 03, 2008 9:09am

    kangmi

    5 posts

    Moderator’s note: Moved to Howto.

    I’ve tried every solution I’ve been able to find on the forum and on the wiki, but none have worked for me so far. First, here’s my site.

    I would like a reader to be able to click on the title of the post in the Comments section of the sidebar and be taken directly to that full comment on the comments page.

    I’m currently trying to implement Method #2 in the wiki, with no success.

    Here’s the code I’m using on the sidebar:

    {exp:comment:entries sort="desc" orderby="date" limit="10" weblog="{master_weblog_name}" dynamic="off"}
    <li>{exp:word_limit total="5"}{comment}{/exp:word_limit} {if url != ""}<a href="http://{url}">{/if}{name}{if url != ""}</a>{/if} on '<a href="http://{comment_auto_path}#{comment_id}">{title}</a>'</li>
    {/exp:comment:entries}

    And, as I understand it, I must also place some code on the comments page so that the above code knows where to go. Here’s what I’ve got:

    
    
    

    I’m perfectly happy tweaking this solution until it works, or using something else that works. Thanks for your help.

  • #2 / Nov 04, 2008 10:17am

    kangmi

    5 posts

    Bumping, as I still haven’t been able to find a way to make this work. Would appreciate the support.

  • #3 / Nov 12, 2008 2:51am

    bkuberek

    124 posts

    This is how I added permalinks to comments.

    http://www.blackbookmag.com/article/first-lady-elect-michelle-obama/4901

    its not the best approach, but as long as you don’t change the limit parameter the links will not break.

    {exp:comment:entries weblog="{weblog}" limit="25" paginate="bottom"}                        
    <div id="comment-{absolute_count}" class="{switch="resultRowOne|resultRowTwo"}">
        <div class="clearfix">
            <div class="left">
                <h4 class="comment-author-data">Posted by {if author_id}<a href="http://{path=member/profile}{author_id}rel=nofollow">{name}</a>{if:else}{name}{/if} on {comment_date format='%D %M %j, %Y'} at {comment_date format='%h.%i %a'}</h4>
            </div>
            <div class="right">
                <a href="#comment-{absolute_count}rel=nofollow">#{absolute_count}</a>
            </div>
        </div>
        <div class="review-text">
        {comment}    
        </div>
    </div>
    {paginate}
    {if "{total_pages}" > 1}
    Page {current_page} of {total_pages} | {pagination_links}
    {/if}
    {/paginate}
    {/exp:comment:entries}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases