Adding template foreach snippet.