JPaveh Posted November 16, 2014 Posted November 16, 2014 As of course its 4.0 and there is a new way the templates work, I am wondering how you go about adding links to the new navigation? {template="lkeyWarning" app="core" group="global" location="global" params=""} <ul id='elMobileNav' class='ipsList_inline ipsResponsive_hideDesktop ipsResponsive_block' data-controller='core.front.core.mobileNav'> {{if \IPS\Member::loggedIn()->member_id and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'search' ) )}} <li><a href='{url="app=core&module=system&controller=vnc" seoTemplate="vnc"}'><i class='fa fa-star'></i></a></li> {{endif}} {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'search' ) )}} <li class='ipsJS_show'> <a href='{url="app=core&module=search&controller=search" seoTemplate="search"}' data-action="mobileSearch"><i class='fa fa-search'></i></a> </li> {{endif}} <li data-ipsDrawer data-ipsDrawer-drawerElem='#elMobileDrawer'> <a href='#'> {{$total = \IPS\Member::loggedIn()->notification_cnt;}} {{if !\IPS\Member::loggedIn()->members_disable_pm and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'messaging' ) )}} {{$total += \IPS\Member::loggedIn()->msg_count_new;}} {{endif}} {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'modcp' ) ) and \IPS\Member::loggedIn()->modPermission('can_view_reports')}} {{$total += \IPS\Member::loggedIn()->reportCount();}} {{endif}} {{if $total}} <span class='ipsNotificationCount' data-notificationType='total'>{$total}</span> {{endif}} <i class='fa fa-navicon'></i> </a> </li> </ul> <nav> <div class='ipsLayout_container ipsClearfix' id='elSearchNavContainer'> {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'search' ) )}} <div id='elSearch' class='ipsPos_right' data-controller='core.front.core.quickSearch'> <form accept-charset='utf-8' action='{url="app=core&module=search&controller=search" seoTemplate="search"}' method='post'> <a href='#' id='elSearchFilter' data-ipsMenu data-ipsMenu-selectable='radio' data-ipsMenu-appendTo='#elSearch' class="ipsHide"> <span data-role='searchingIn'> {lang="search_everything"} </span> <i class='fa fa-caret-down'></i> </a> <ul id='elSearchFilter_menu' class='ipsMenu ipsMenu_selectable ipsMenu_narrow ipsHide'> <li class='ipsMenu_item ipsMenu_itemChecked' data-ipsMenuValue='all'> <a href='{url="app=core&module=search&controller=search&do=search" csrf="1"}' title='{lang="search_everything"}'>{lang="search_everything"}</a> </li> <li class='ipsMenu_sep'><hr></li> {{if count( output.contextualSearchOptions )}} {{foreach output.contextualSearchOptions as $name => $data}} <li class='ipsMenu_item' data-ipsMenuValue='{expression="json_encode( $data )"}' data-options='{expression="json_encode( $data )"}'> <a href='#'>{$name}</a> </li> {{endforeach}} <li class='ipsMenu_sep'><hr></li> {{endif}} {{foreach output.globalSearchMenuOptions() as $type => $name}} <li class='ipsMenu_item' data-ipsMenuValue='{$type}'> <a href='#'>{lang="$name"}</a> </li> {{endforeach}} <li class='ipsMenu_sep'><hr></li> <li class='ipsMenu_item ipsMenu_itemNonSelect'> <a href='{url="app=core&module=search&controller=search" seoTemplate="search"}' accesskey='4'><i class='fa fa-cog'></i> {lang="advanced_search"}</a> </li> </ul> <input type='search' id='elSearchField' placeholder='{lang="search_placeholder"}' name='term'> <button type='submit'><i class='fa fa-search'></i></button> </form> </div> {{endif}} <ul id='ipsLayout_mainNav' class='ipsPos_left'> {{if \IPS\Settings::i()->show_home_link}} <li><a href='{setting="home_url"}'>{setting="home_name"}</a></li> {{endif}} {{foreach \IPS\Application::allExtensions( 'core', 'FrontNavigation' ) as $id => $nav}} <li> <a id="elNavigation_app_{expression="strtok( $id, '_')"}" href='{$nav->link()}' {{if $nav->active()}}class='active'{{endif}} {{if $children = $nav->children()}}data-ipsMenu{{endif}}> {$nav->title()} {{if $children}} <i class='fa fa-caret-down'></i> {{endif}} </a> <li><a href='{setting="home_url"}'>{setting="home_name"}</a></li> </li> {{if $children}} <ul id="elNavigation_app_{expression="strtok( $id, '_')"}_menu" class="ipsMenu ipsMenu_auto ipsHide"> {template="navBarChildren" app="core" group="global" params="$children"} </ul> {{endif}} {{endforeach}} {{if member.group['g_view_board']}} <li class='ipsHide cCommunityHome'><a href='{setting="base_url"}' title='{lang="go_community_home"}'><i class='fa fa-angle-left'></i> {lang="community_home"}</a></li> {{endif}} </ul> </div> </nav> Where do I add what for a new navigation link?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.