allowing the grabTemplates function to operate on a context element