Closed (outdated)
Project:
Flag Lists
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Jun 2012 at 13:06 UTC
Updated:
26 Feb 2020 at 07:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joelrosen commentedI also needed to do this and I believe you can get it without hacking Flag List by adding this to your own custom module:
This should add a "Relationship" in your Flag List view so you can access flagged nodes, and then use aggregation to get a count of the nodes in each flag list. It seems to be working for me. Maybe this should be patched in?
Comment #2
queenvictoria commentedHere is a patch to add the [flag_list:count] token which you can use in your template link text at http://example.com/admin/structure/flags/manage/fl_template
This gets used in the AJAX callback too so it will go all the way through the system (which is what the OP was after).
Note: only new lists will get the corrected message. It looks like the master message is stored in the flag table where as the one that actually gets used is in the flag_list_flags table which is not updated when the template is re-saved. I'm looking for an issue queue on this.
Comment #3
queenvictoria commentedHere is an extended patch that adds utility methods for retrieving number of entities flagged, and number of times an entity has been flagged by a user. It also includes Views support for a Flag lists: count field, and reworks token support to use the new methods.
Comment #3.0
queenvictoria commentedchange
Comment #4
sl27257