<?php $columnsLimit = $block->getColumnsLimit() ?: 0; ?>

What is the use of $columnsLimit in Magento theme topmenu.phtml?

1 Answer 1


I believe this is the maximum depth for categories as controlled by Config -> Catalog -> Catalog -> Category Top Navigation

Basically how many levels deep the navigation goes into your category structure.

0 in this case meaning no limit.

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.