Menu Lists

Create flexible menus straight from October CMS admin

Back to Menu Lists Support

Hectic
Hectic

I was wondering if the Enabled / Disabled checkbox for the menu items is working as should be? I've installed the plugin and created my menu and its items, and that all works as expected. However when I attempt to Disable a Menu Item so that it could be hidden. It doesn't work, as it doesn't seem to save my changes. I click on Disable and Save and Close and then reopen the MenuItem and it still has a check for it to be Enabled.

I've decided to make the change directly in the db to see if it was just an update error, however when changing the column from 1 to 0, and viewing the site again, the Item still shows up in the Menu bar. Please advise. Thank you.

Flynsarmy
Flynsarmy

Thanks for the report. I've published an update to fix your issue however this PR needs to be accepted before the GUI works. In the meantime just edit the DB manually the way you've been doing.

Last updated

Hectic
Hectic

Thank you for this update very much. I have another question if you don't mind. I would like to be able to get the Menu Items and their settings (enabled vs disabled, etc). You don't seem to have a function available for that, none that I've noticed anyway. Could you please direct me to the appropriate function for this or tell me how I would be able to ge this informaiton? Thanks again for your help on this great plugin.

Flynsarmy
Flynsarmy

You can get this info the same way you use any model in October or Laravel for that matter.

$menu = \Flynsarmy\Menu\Models\Menu::find(4); // Replace with your ID
var_dump($menu->toArray()); // Output details

foreach ( $menu->items as $item )
    var_dump( $item->toArray() ); // Output details

Last updated

that0n3guy
that0n3guy

Just as an alternative, you can do:

$menu = \Flynsarmy\Menu\Models\Menu::find(4); // Replace with your ID
var_dump($menu->getAttributes()); // Output details

foreach ( $menu->items as $item )
    var_dump( $item->getAttributes() ); // Output details

Its the "same" thing essentially, but without array stuff.

1-5 of 5