0

In my site are use 2 minicarts (in header and sidebar) with same knockout template:

app/design/frontend/Vendor/Theme/Magento_Checkout/web/template/minicart/content.html

I want to adjust small fixes, for sidebar minicart (only remove one button), and I don't want to create another one template.

How I can to check in knockout that it's exactly sidebar?

Something like that:

<button data-bind="visible: isSidebar()" />

It is possible? May I get root element in knockout template? If yes - I could to check sidebar html class.

  • You want to hide a button in sidebar , like want to hide "view cart " button ? if yes then you can do this job using css only , not need to touch any code – Manoj Deswal Sep 20 '17 at 4:02
  • Yes, of course. But I would like to do this using knockout. It is possible? – Evgeny Levinsky Sep 20 '17 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.