Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Category manager - banner item count #6934
This patch creates in "Category Manager: Banners" 4 new columns with the number of banners per category. It contains a helper file for com_banners that is used in com_categories to calculate the number of banner items (published, unpublished, archived, and trashed) in each category.
The Category Manager: Banners (Components > Banners > Categories) does not display the number of banners in each category.
Create some new banners that are unpublished, trashed & archived (tip: name the unpublished banner "Unpublished Banner" to test if the calculations are correct).
Note This patch works only in combination with #6916. Install both #6916 and this patch (the order of installation does not matter, you just need both).
Please also check the other administrator template Hathor
In Extensions > Template Manager > Select Hathor
referenced this pull request
May 13, 2015
on issue #6934 (count for BANNERS), I noticed that clicking on "zeros" would still show all banners of the category, no matter their "status".
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6934.
Thank you both for testing. I've analysed & reproduced the problem: The status filter of the com_banners component works differently from other components.
The category manager com_categories creates number counters with hyperlinks with status filter &filter[published]=. All components listen for the "Select Status" filter to &filter[published]= (and expect a statuscode of 0,1,2 and -2).
However the banner component listens to &filter[state]=.
I've changed the 'state' field to 'published' in the filter administrator/components/com_banners/models/forms/filter_banners.xml and in the banners model.
Now this PR (in combination with PR #6916) displays a working "banner item counts" in the Category Manager: Banners that are hyperlinked correctly to * Banner Manager: Banners* with filtered items on published & category filter.