• 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?

Mutt

Well-known member
#1
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?
 

Jake Bunce

XenForo moderator
Staff member
#2
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:

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>
	</div>
	
	<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>
				</xen:foreach>
				<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>
						</xen:form>
						<div id="AdminSearchResults"></div>
					</div>
				</li>
				<li class="separated"><a href="{$publicUrl}" target="_blank">{$xenOptions.boardTitle}</a></li>
			</ul>
		</div>
		<div class="pad"></div>
	</div>
	
</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
 

Mutt

Well-known member
#3
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

Screenshot_1.jpg
 
R

ragtek

Guest
#4
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

View attachment 25948
it's AFAIK not possible because the links are created automatic as adminlinks
Code:
<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>