2020/07/21
教程来自Nash Latkje ,原作者叶奕
主题目录 component/aside.php 第87行左右$asideItemsOutput = "";
之下添加“asideSecondItemsOutput”的定义:
$asideSecondItemsOutput = "";
在第100-105行左右添加"status"字段的判断,将
if (@$itemTarget){
$linkStatus = 'target="'.$itemTarget.'"';
}else{
$linkStatus = 'target="_blank"';
}
if (trim($itemFeather)!==""){
修改为
if (strtoupper($itemStatus) === 'SEC'){
if (trim($itemFeather)!==""){
$asideSecondItemsOutput .= '<li> <a '.$linkStatus.' href="'.$itemLink.'"
class ="auto"><span class="nav-icon"><i data-feather="'.$itemFeather.'"></i></span><span>'._mt($itemName).'</span></a></li>';
}else if (trim($itemClass)!==""){
$asideSecondItemsOutput .= '<li> <a '.$linkStatus.' href="'.$itemLink.'" class ="auto"><span class="nav-icon"><i class="'.$itemClass.'"></i></span><span>'._mt($itemName).'</span></a></li>';
}
}
else if (trim($itemFeather)!==""){
在125行左右<?php if (@!in_array('component',$this->options->asideSetting)): ?>
之上添加:
<?php if (@$asideSecondItemsOutput): ?>
<li><a class="auto"><span class="pull-right text-muted">
<i class="fontello icon-fw fontello-angle-right text"></i>
<i class="fontello icon-fw fontello-angle-down text-active"></i>
</span>
<span class="nav-icon">
<i class="glyphicon glyphicon-bookmark"></i></span>
<span><?php _me("更多"); ?></span></a><!-- 默认图标与名称,可以随意修改 -->
<ul class="nav nav-sub dk"><li class="nav-sub-header"><a data-no-instant><span><?php _me("更多"); ?></span></a></li>
<?php echo @$asideSecondItemsOutput ?>
</ul></li>
<?php endif; ?>
后台设置外观-->高级设置-->左侧边栏导航加入:
{"name":"短网址","class":"glyphicon glyphicon-paperclip","link":"http://dwz.ssr0.cn:8000","status":"sec"}
其中,"status":"sec"即表示将该条目放置于二级菜单中。