add if snippets in views