Fixes NoReverseMatch on new placeholder

Made changes to templatetag code to always use the placeholders found in template. And if one is not found then create it. Fixed #1876