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.

{url_or_email_as_author} of the comment gives the author of the entry

February 27, 2009 8:25am

Subscribe [2]
  • #1 / Feb 27, 2009 8:25am

    Willem de Boer

    142 posts

    Hi,

    I have embedded the {exp:comment:entries} in the {exp:weblog:entries} on my index page.

    That works fine, but there is one problem. The {url_or_email_as_author} gives the author of the article and not the author of the comment.

    Is there something i do wrong?

    This is how my code looks like:

    {exp:weblog:entries weblog="{master_weblog_name}" orderby="date" sort="desc" limit="2"}
    {title}
    
    {body}
    
    {exp:comment:entries limit="5" dynamic="off" entry_id="{entry_id}"}
    
    <i>{comment}</i>
    
    Posted by {url_or_email_as_author}  {comment_date format='%m/%d'} {comment_date format='%h:%i %A'}
    
    {/exp:comment:entries}
    {/exp:weblog:entries}
  • #2 / Feb 27, 2009 8:34am

    Ingmar

    29245 posts

    I think it’s one of the unintended consequences of nesting tags the way you do (which, by the way, is not supported.) I would try to use a sub-template to get around this issue.

  • #3 / Feb 27, 2009 8:47am

    Willem de Boer

    142 posts

    Ohkee, that will work? I’ll give it a try. Thanks.

  • #4 / Feb 27, 2009 11:49am

    Ingmar

    29245 posts

    Yes, it should 😊 I remember doing something like that. It’s still somewhat resource-intensive, mind you, so you might want to keep the number of entries in your index low.

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

ExpressionEngine News!

#eecms, #events, #releases