External templates with local scope