Skip to content

Display number of comments in a non default position? #116

Discussion options

You must be logged in to vote

You could do that in a template override with some custom code, assuming the “Content – Akeeba Engage” plugin is published. The plugin is required to load enough of the extension to make the following code possible

$container = \FOF40\Container\Container\Container::getContainer('com_engage');
$commentsModel = $container->factory->model('Comments')->tmpInstance();
$numComments   = $commentsModel->asset_id($article->asset_id)->count();

where $article is the article record, assuming that the third party module also returns the asset_id column for the article.

If the $article object does not have the asset_id column but only the id (article ID) column you can add a database query to get the J…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Razerr
Comment options

Answer selected by Razerr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants