Hiding templates when appropriate