Skip to content

Navigation Menu (Custom Menu) Example

Lawrence Okoth-Odida edited this page Mar 26, 2016 · 1 revision

Plugins Required

Outcome

some/desired/path/$menuId  -> display the custom menu with id $menuId

This is useful for dynamically generating pages for your custom menus, and is likely to be used in aid of something else (e.g. creating a custom navigation structure for your Catalog).

Menu

Route

some/desired/path/([a-z0-9]+)

Action

<?php

return array(
  'title'   => /* */,
  'content' => function($slug) {
    get_custom_menu($slug);
  }
);
Clone this wiki locally