My advice would rather be to use the
PHx plugin, which has a powerful syntax to that effect (and many more...).
The wiki has
good PHx documentation and can give you a rough idea of what is possible here (though you really have to try it out to realize its power !).
The benefits of PHx are limitless, so much so that I can’t live without it ! It extends the parser and once you get into its syntax, you can really do a lot without touching PHP, which (for me) is good
In your case it would be as simple as :
[tt][+phx:if=`[*id*]`:is=`2`:then=`[[....snippet call....]`:else=``+][/tt]
You can do nice stuff using the UltimateParent snippet in the if statement, and that’s just one example...
The downside of conditionnals is it can hit your server a bit when you add to many of them.
The upside is that you can reduce the number of template which is great for maintenance