in reply to If Condition in Template file

Thanks for help. It works with directives.