Implement template filter