register allowedContent with each templates

the new allowedContent key of template registration is used to populate filter.
Codestyle changes.