1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I link to a non-xen page in Admin Navigation?

Discussion in 'XenForo Development Discussions' started by Mutt, Feb 11, 2012.

  1. Mutt

    Mutt Well-Known Member

    How do I add a link in the Admin Navigation to a non-xen page? Adding inside links was easy enough but when I try to link to something link phpmyadmin I get "A controller for the route path xxxxxxx was not found." when clicking the link Is there a trick or does it only link inside?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It puts the link through xen:adminlink which you don't want in your case.

    You can hard-code it:

    Admin CP -> Development -> Admin Templates -> header

    Add the red code:

    <xen:edithint template="header.css" />
    <div id="header">
    	<div id="logoLine">
    		<div class="pageWidth">
    			<a href="http://xenforo.com" target="XenForo"><img src="@imagePath/xenforo/XenForo-small.png" id="logo" /></a>
    			<h2 id="version"><a href="http://xenforo.com" target="XenForo">XenForo</a> {$xenOptions.currentVersion}</h2>
    			<a href="{xen:adminlink 'login/logout', '', '_xfToken={$visitor.csrf_token_page}'}" id="logoutLink">{xen:phrase log_out_x, 'name={$visitor.username}'}</a>
    	<div id="tabsNav">
    		<div class="pageWidth">
    			<ul class="acpTabs">
    				<xen:foreach loop="$adminNavigation.tabs" value="$navigationTab">
    					<li{xen:if {$navigationTab.selected}, ' class="active"'}><a{xen:if {$navigationTab.link}, ' href="{xen:adminlink {$navigationTab.link}}"'}>{$navigationTab.title}</a></li>
    				<li><a href="http://www.apple.com/">CLICK</a></li>
    				<li class="separated Popup" id="AdminSearch">
    					<a rel="menu" class="PopupClosed" accesskey="f">{xen:phrase search}</a>
    					<div class="Menu" id="AdminSearchMenu">
    						<xen:form action="{xen:adminlink search}" id="AdminSearchForm" data-target="#AdminSearchResults">
    							<label><!--{xen:phrase search}: --><xen:textbox name="q" type="search" id="AdminSearchInput" /></label>
    						<div id="AdminSearchResults"></div>
    				<li class="separated"><a href="{$publicUrl}" target="_blank">{$xenOptions.boardTitle}</a></li>
    		<div class="pad"></div>
    This change will be overwritten when you upgrade, but this is the only solution that I see.

    The result:

    Screen shot 2012-02-12 at 12.19.06 PM.png
  3. Mutt

    Mutt Well-Known Member

    thanks but I was talking about adding them using "admin.php?admin-navigation" like the "Mutt's Links" in my screencap. assumed there would be a way. guess not. If I'm going to hard code them, I guess I'll hard code them there. maybe.. thanks again

  4. ragtek

    ragtek Guest

    it's AFAIK not possible because the links are created automatic as adminlinks
    <template title="sidenav_entry"><![CDATA[<li class="{xen:if $children, sideNavSection, sideNavLink}"><a{xen:if {$link.link}, ' href="{xen:adminlink $link.link}"'}>{$link.title}</a>

Share This Page