Fix of Search Template - conditional clauses not rendering correctly #8308
   - implemented the conditional parsing capabilities
   - attached few junit test cases to test it (reverted from commit bf1ae3121d35072211113023be7f59239a053560)