Page list + show author and comment count

Hi all,

I have been using the C5 Blog Block which is fantastic but I have hit some issues I can't get past (confirmed by block author).

I am going to resort to using Page List (in place of blog list) and simply adding pages (in place of Blog Posts) to get around the issue.

In doing this I was hoping to be able to customise the Page List block to display author and comment count of the page it is linking to in much the same way as the blog blocks blog list.

Is there anyone out there that might be able to get this running?

Any help would be greatly appreciated.


View Replies:
synlag replied on at Permalink Reply
yes, write me a pm.
cannonf700 replied on at Permalink Reply
you can get this code to get the page author and comment count:
<p class="meta"><?php  echo t('Posted by')?> <?php   echo $author; ?> - <?php   echo $comments; ?>

but you will have to tinker with the header of the page list a little bit. mine looks like this:
   for ($i = 0; $i < count($cArray); $i++ ) {
      $cobj = $cArray[$i]; 
      $target = $cobj->getAttribute('nav_target');
      $title = $cobj->getCollectionName();
      $date = $cobj->getCollectionDatePublic();
      $author = $cobj->getVersionObject()->getVersionAuthorUserName();
      $entryController = Loader::controller($cobj);
      $comments = $entryController->getCommentCountString('%s '.t('Comment'), '%s '.t('Comments')); 

note specifically that we added a call for both the $author and $comments.

good luck