We have a property site that we use to categorize our listings. I would like to know how to make each category show the number of content it has e.g. Sales(45), Lettings(20), etc.
Any help about how to do this? I am new to Drupal.
could you add some details to your question that will tell us WHERE you want to see these counts? Is it in a page template? A view? A block? The answer will change depending.
In the meantime, please look at this: Count of nodes by type
By doing so, a new view is added to your site. Here are some more details about it, quoted from the linked page above (to which I added some formatting here):
You can see the charts created via this new view in your own site by navigating to charts/examples or by using a menu link with a title like Charts examples. After doing so, a page is shown with 2 sub-menu tabs:
- the first tab is titled Built-in examples (this example is used to showcase Using the Charts API).
- the second tab is titled Views example, and is what is created from the new view created during the installation of the charts module. As an alternative to using this tab, just navigate to charts/examples/views in your site. You should then see a column chart and a pie chart, which are followed by a tabular display also. Both charts and the table display contain data about the total number of nodes for each of the available content types.
Visit the Charts demo site for an online preview of of these out-of-the-box examples.
Disclosure: I'm the maintainer of this module,
I hope this does not violate the site's policy on self-promotion.