的Joomla! K2 - 如何获取用户页面的作者项目计数?

I have several authors on my website and each of them has a page of his own with his image, description and a list of all his items. I would like to add an "Item Counter" to their pages, so the page will look like this:

author name, number of posts -> author description -> author items.

The only thing i miss here is the number of posts by the author.

Thank you so much for the answers!

You will need to slightly modify the K2 view (we did this to one of our clients). You will need to create a query that resembles the following in the view:

SELECT count(*) FROM #__k2_items WHERE authorid='id';

Now you should pass the result of that query to the template (using the assignRef function on the $this object. That's it!

Note: not sure about the field name authorid, I'm sure it's something else but I can't remember it on top of my head.