+30.2152151245-8 abuse@cms39.com

Menus are built under Theme → Menus with drag & drop. Each menu has a slug (e.g. header) that the theme uses to render it.

Rendering

echo cms39_menu('header', ['template' => 'bootstrap', 'depth' => 2]);
echo cms39_menu('footer-1', ['class' => 'list-unstyled', 'depth' => 1]);
$tree = cms39_menu_tree('footer-1');   // the tree, for your own HTML

Templates: list (plain <ul> with sub-menus), bootstrap (navbar with dropdowns), breadcrumb (the trail to the current page). In Twig: {{ menu('header') }}; in content: [menu name="footer-1"].

Items

  • Content: page, post, product; title and URL follow the content.
  • Taxonomy: category or tag.
  • Link: any URL; {lang} becomes the page language.
  • Group heading and separator.
  • Dynamic: children of a page, latest posts, taxonomy terms or filter values, updated automatically.

Each item has a title per language, icon, CSS class and visibility (everyone / logged in / guests). The current item gets active and its parents active-parent.

From code

$id = cms39_menu_save('footer-1', 'Footer');
cms39_menu_items_set($id, [
    ['type' => 'post', 'target_id' => 12],
    ['type' => 'dynamic', 'options' => ['dynamic' => ['kind' => 'latest', 'post_type' => 'post', 'limit' => 5]]],
]);
for more information contact us by
E-MAIL or by phone at (+30) +30.2152151245-8