Fix Map Template to use new Context

new context priority and hooks