Closed xtrasmal closed 9 years ago
Yup~
There's two methods you can call on a menu item; hasChildren()
which will return a bool
based on if it has children items or not, and children()
which will return an array of all children items that you'll be able to loop through as needed. You can see these methods in use on the wiki here.
You should be able to build a partial to loop through children item within your sidebar.
How do I create a menu that has
The answer I provided in your other issue https://github.com/caffeinated/menus/issues/20#issuecomment-96081012 answers those two questions.
Thank you very much. I got it working.
I've got a menu at the top of the site and want the children to be show on a sidebar. Is it possible to show the children only?