Module Builder Item Count?

Posted by Community Admin on 03-Aug-2018 19:27

Module Builder Item Count?

All Replies

Posted by Community Admin on 12-Jul-2016 00:00

I would like to display the number of items in a blog or custom module (module builder) without using javascript or displaying the items themselves. This seems like a simple task to only pull the total number of items, entries, listings, etc. Is there a simple way to achieve this?

Telerik's forum is a good example (Attached screenshot).

 

Thanks

Posted by Community Admin on 15-Jul-2016 00:00

Hi Nate,

In that case you do not need the Blogs widget but a Label and set its value from code behind by query the blogs count like::

var blogPostsCount = Telerik.Sitefinity.Modules.Blogs.BlogsManager.GetManager().GetBlogPosts().Where(b => b.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live).Count();

Similar is the approach for all the other content types.

Regards,
Svetoslav Manchev
Telerik by Progress
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed