Hiding a Menu on certain Pages

Hi! I am a little bit new to the oxid-module development and i got some questions for my module.

At the moment, I am working on a new module, in which i want to hide the minibasket, when i am in the basket.

I thought, it could be useful to write this in the metadata:

	'blocks'=>	array("template" => 'page/checkout/basket.tpl', "block" => 'checkout_basket_main', "file" => "out/page/checkout/hi_hiddenbasket_removebasket.tpl"),
			array("template" => 'page/checkout/order.tpl', "block" => 'checkout_basket_main', "file" => "out/page/checkout/hi_hiddenbasket_removebasket.tpl"),
			array("template" => 'page/checkout/payment.tpl', "block" => 'checkout_basket_main', "file" => "out/page/checkout/hi_hiddenbasket_removebasket.tpl"),
			array("template" => 'page/checkout/thankyou.tpl', "block" => 'checkout_basket_main', "file" => "out/page/checkout/hi_hiddenbasket_removebasket.tpl"),
			array("template" => 'page/checkout/user.tpl', "block" => 'checkout_basket_main', "file" => "out/page/checkout/hi_hiddenbasket_removebasket.tpl"),

These are my Pages (basket, order, user, thankyou, payment), where I want to hide the Minibasket.

Now i realised, that my intention doesn’t work, because the ‘blocks’-array works for all pages. And this is my first question: When i only have ‘blocks’ => array() in my metadata.php, why does this overwrites my template?

Shouldn’t it do nothing, when i let it empty?

When you remove blocks from metadata, you also have to delete them in table oxtplblocks. When you remove entries from the other arrays, you also have to delete the corresponding files. Also you should clear /tmp.
To hide things in checkout, there is a method available in template: $oView->getIsOrderStep(), so you might not need a module for this.

[{if $oView->getIsOrderStep()}]
[{$smarty.block.parent}]
[{else}]
[{oxstyle include=$oViewConf->getModuleUrl(“hi_hiddenbasket”, “src/styles/minibasket.css”)}]
[{/if}]

Well, this is what my code looks like. I tried this within a module, but I can’t hide the minibasket. I think it is, because the checkout-steps are in an extra module. I only get shown the minibasket, when i got $smarty.block.parent as an Else-parameter. So that means, that there is no such method (getIsOrderStep) in my CMS. I wanted to make this in a Module, so i am looking for an other solution…

This is probably because you use getIsOrderStep within a widget. In this case you have to get parent view first with getConfig()->getTopActiveView()