binzy;10934892 wrote:
The number of items in each subcategory is stored as a variable ($numrows) in each subcategory page - I need a way to access the value of this variable on the category page to be able to display it.
Not really. It's stored in a variable when that specific page is requested, and only at that time. However, looking at the code that generate the subcategory pages will tell you how that variable is set, which should give you an idea on how to do the same for your subcategory listing.
However, on the subcategory page, there's a big change the number of items is retrieved by a separate sql query, and you do not want to
while("more sub category links") {
query('number of items for this subcategory');
"display subcategory link";
}
You'd want to retrieve this information in the same query that retrieves the subcategories.