I want use if else like this code but it not working. Please help me

{{if config path="system/config/path" == 1}}
<p> ok </p>
<p> no </p>

I create it in home page, menu->cms->page

  • what it is showing on front ?
    – Pawan
    Aug 8, 2019 at 5:14
  • try remove space in "if config" use "ifconfig" instead. It's just a guess, I am not sure on this Aug 8, 2019 at 5:25

1 Answer 1


It would be fine if you create phtml file and call that particular phtml file in the CMS block.

for eg. Your CMS block

{{block type="core/template" template="page/html/condition.phtml"}}
  • hi Sunny Rahevar, i tryed, but it not working. i created home.phtml in app/design/frontend/hemmen2/default/template/page/html/home.phtml and add {{block type="core/template" template="page/html/home.phtml"}} in cms but it not show
    – Brian N
    Aug 8, 2019 at 12:21
  • Can you please first print hello in the phtml file instead of your code? if 'hello' display in the front-end that means your file called correctly and there is something issue regarding in your code in the phtml file. Aug 9, 2019 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.