Hi David, have you tried '{%tagname%}' without the '%'?
In kentico repeater where clause you could use something similar to
('{%ToInt(tagid, "")%}' = 0 AND '{%tagname%}'='') OR (DocumentID IN (SELECT DocumentID FROM CMS_DocumentTag WHERE TagID = {%ToInt(tagid, "")%} )) OR (DocumentID IN (SELECT DocumentID FROM CMS_DocumentTag WHERE TagID IN (SELECT TagID FROM CMS_Tag WHERE TagName = '{%tagname%}' AND TagGroupID = {%ToInt(groupid, "")%} )))
You can strip out items from it, but hopefully this should help.