Streaming live at 10am (PST)

Adding a dynamic item that counts the number of posts in a collection


#1

Can be done?
As in, lets say a collection has 15 posts, can i have a counted next to the link to show how many posts are there?
Something like this:

As i add or delete posts from my collection, the number showing how many articles will change.


Code help - count number of cms items
#2

If I really needed this, I would add a dynamic list, insert a single character inside the single list item, hide the dynamic list from being displayed, then use JavaScript to count the number of items and insert the number into the text/link element.


Add Number of Collection Items to Heading Text
#3

Hi @samliew
Which code?


#4

Can i do it with the number element?


#5

Custom JavaScript coding required. No, you cannot use that number field, as it is for a single item.


#6