Hello,
i want to create two custom menus on my website and want to have option to add some pages in one menu and some in second page.
i have created one template called top-menu this template is using repeater name "menu_pages" for page, so that i can add as many pages i want.
filed name in repeater is "menu_page"
after that i am calling that page in my template like that
<ul class="sf-menu ">
<li class="current active"><a href="<?=$config->urls->root;?>">Home</a></li>
<?php
$top_menu=$pages->get("/top-menu/");
foreach($top_menu->menu_pages as $menu_page) {
?>
<li class=""><a href="<?php echo $menu_page->url ;?>"><?php echo $menu_page->page-tile ;?></a></li>
<?php } ?>
</ul>
but i am getting output Home | 0 | 0 | 0
also i want to check if page have child pages then again sub menu will be created every time page have child page.
i can't figure out how to do that.
i saw few plugins but i want to write it myself.
Thanks