added template tag to parse templates from database