0
Basicaly我想將Kunena論壇部分鏈接設置爲標籤,如HERE。原代碼在第一頁顯示特定部分看起來如下:Joomla Kunena論壇 - 更改部分鏈接到標籤
<?php
/**
* Kunena Component
* @package Kunena.Template.Blue_Eagle
* @subpackage Category
*
* @copyright (C) 2008 - 2013 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
defined ('_JEXEC') or die();
$tabclass = array ("row1", "row2");
$mmm=0;
foreach ($this->sections as $section) :
$htmlClassBlockTable = !empty ($section->class_sfx) ? ' kblocktable' . $this->escape($section->class_sfx) : '';
$htmlClassTitleCover = !empty ($section->class_sfx) ? ' ktitle-cover' . $this->escape($section->class_sfx) : '';
?>
<div class="kblock kcategories-<?php echo intval($section->id) ?>">
<div class="kheader">
<h2><span><?php echo $this->GetCategoryLink ($section, $this->escape($section->name)); ?></span></h2>
<?php if (!empty($section->description)) : ?>
<div class="ktitle-desc km hidden-phone">
<?php echo KunenaHtmlParser::parseBBCode ($section->description); ?>
</div>
<?php endif; ?>
</div>
<div class="kcontainer" id="catid_<?php echo intval($section->id) ?>">
<!-- Here Comes Categories Displayed As Tab Content-->
<!-- Finish: Category Module Position -->
</div>
</div>
<?php endforeach; ?>
所以我改變了第一部分從
<div class="kheader">
<h2><span><?php echo $this->GetCategoryLink ($section, $this->escape($section->name)); ?></span></h2>
<?php if (!empty($section->description)) : ?>
<div class="ktitle-desc km hidden-phone">
<?php echo KunenaHtmlParser::parseBBCode ($section->description); ?>
</div>
<?php endif; ?>
</div
到
<div class="navbar">
<div class="navbar-inner">
<ul class="nav">
<ul id="sections-tab" class="nav nav-pills visible-desktop">
<li class="active">
<a id="sect<?php echo intval($section->id) ?>" href="#sect<?php echo intval($section->id) ?>" data-toggle="tab">
<span class="sectiontab<?php echo intval($section->id) ?>"><?php echo $this->GetCategoryLink ($section, $this->escape($section->name)); ?></span>
</a>
</li>
</ul>
</ul>
</div>
</div>
,但它仍然顯示切片正常。我知道我需要移動foreach($ this-> sections爲$ section) navbar類之間,但是...老實說我卡在這裏,因爲不知道PHP很多。 所以任何幫助很多apretiate。