/** * Get a menu split into 2 instances, a primary and submenu * * @param string $name The slug of the root menu item you wish to retrieve * @param string $showChildren Whether or not it should show the children when rendering * @param string $max The max menu items to include in the first menu * @param string $split Whether to return a 2nd menu item with the remaining menu items in it * @return mixed Either one sfSympalMenu instance of an array with 2 sfSympalMenu instances */ function get_sympal_split_menus($name, $showChildren = null, $max = null, $split = false) { $menu = sfSympalMenuSiteManager::getMenu($name, $showChildren); if ($menu) { return sfSympalMenuSiteManager::split($menu, $max, $split); } else { return false; } }
public function getMenu() { return sfSympalMenuSiteManager::getMenu($this['root_id']); }
echo $contentType->getLabel(); ?> <?php echo __('Links'); ?> </h2> <ul> <?php if ($content->count()) { ?> <?php $menuItem = $content[0]->getMenuItem(); ?> <?php if ($menuItem && ($parentMenuNode = sfSympalMenuSiteManager::getMenu('primary')->findMenuItem($menuItem)->getParent())) { ?> <li> <?php echo image_tag('/sfSympalPlugin/images/folder.png'); ?> <?php echo link_to($parentMenuNode->getLabel(), $parentMenuNode->getRoute()); ?> </li> <?php } ?> <?php foreach ($content as $c) {
echo __('Links'); ?> </h2> <ul> <?php if ($content->count()) { ?> <?php $menuItem = $content[0]->getMenuItem(); ?> <?php $parentMenuNode = false; ?> <?php if ($menuItem && ($parentMenuNode = sfSympalMenuSiteManager::getMenu(sfSympalConfig::get('default_install_content_type_menu', null, 'primary'))->findMenuItem($menuItem)->getParent())) { ?> <li> <?php echo image_tag('/sfSympalPlugin/images/folder.png'); ?> <?php echo link_to($parentMenuNode->getLabel(), $parentMenuNode->getRoute()); ?> </li> <?php } ?> <?php foreach ($content as $c) {