Page list + show author and comment count
Permalink
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.
Richard.
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.
Richard.
yes, write me a pm.
you can get this code to get the page author and comment count:
but you will have to tinker with the header of the page list a little bit. mine looks like this:
note specifically that we added a call for both the $author and $comments.
good luck
but you will have to tinker with the header of the page list a little bit. mine looks like this:
<?php 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