I need to show the number of times a user has favorited a specified set of entries. I've tried many ways, including different combinations of using Stash and Mx_calc, but have been unsuccessful.
The exp:favorites:count tag doesn't seem to allow this without help. I would like it to do something like {exp:favorites:count entry_id="130|132|463" favorites_member_id="CURRENT_USER"}
, but this is not allowed.
I've tried setting the numbers of each entry with Stash and then adding them with Mx_calc but can't get that to work (below). Maybe there's a simpler way?
{exp:stash:set name="total-favorites" parse_tags="yes"}
{exp:channel:entries channel="topic-content" search:topic-title="advertising" category="5" search:topic-view="IS_EMPTY" dynamic="no" parse="inward"}
{exp:favorites:count entry_id="{entry_id}" favorites_member_id="CURRENT_USER"}
{/exp:channel:entries}
{/exp:stash:set}
{exp:mx_calc parse="inward" expression="sum({exp:stash:get:blah name="total-favorites"})"}
{!--OR--}
{exp:stash:parse trim="yes" parse="inward"}
{exp:mx_calc parse="inward" expression="sum({exp:stash:get:blah name="total-favorites"})"}
{/exp:stash:parse}