2015-01-07 54 views
1

我已經GK5標籤擴展的Joomla 當標籤處於活動狀態與motools插入「活躍」類裏的是這樣的: 插入span標籤時,激活的標籤

<li data-animation="default" class="gkTab gkTabs-1 active "> 
      <span></span>   
    </li> 
    <li data-animation="default" class="gkTab gkTabs-2"> 
      <span></span>   
    </li> 

我當需要標籤是有源插入一個HTML標記到裏這樣的:

<ol class="gkTabsNav"> 

    <li data-animation="default" class="gkTab gkTabs-1 active "> 
      asdasdsadsad  
    <span class="simple"></span>   
    </li> 
    <li data-animation="default" class="gkTab gkTabs-2"> 
      asdsdasdasdsd   
    </li> 

這個地方的PHP的來源是:

<ol class="gkTabsNav"> 
     <?php if($this->config['tabs_pre_text'] != '') : ?> 
     <li class="gkTabsPreText"><strong><?php echo $this->config['tabs_pre_text']; ?></strong></li> 
     <?php endif ; ?> 

     <?php for($i = 0; $i < count($this->tabs["title"]); $i++) : ?> 
     <?php $active_class = ($this->active_tab == $i + 1) ? ' active' : ''; ?> 
     <li<?php if($this->tabs["id"][$i] != '') echo ' id="'.($this->tabs['id'][$i]).'"'; ?> class="gkTab gkTabs-<?php echo ($i+1) . $active_class; ?>" data-animation="<?php echo $this->tabs['animation'][$i]!= '' ? $this->tabs['animation'][$i] : 'default'; ?>"> 
      <?php if($this->config['tabs_spans'] == '1'): ?><span><?php endif; ?> 
       <?php echo $this->tabs["title"][$i]; ?> 
      <?php if($this->config['tabs_spans'] == '1'): ?></span><?php endif; ?> 
     </li> 
     <?php endfor; ?> 
</ol> 

回答

1

喜對於這個問題我插入span標籤到代碼:

<ol class="gkTabsNav"> 
     <?php if($this->config['tabs_pre_text'] != '') : ?> 
     <li class="gkTabsPreText"><strong><?php echo $this->config['tabs_pre_text']; ?></strong></li> 
     <?php endif ; ?> 

     <?php for($i = 0; $i < count($this->tabs["title"]); $i++) : ?> 
     <?php $active_class = ($this->active_tab == $i + 1) ? ' active' : ''; ?> 
     <li<?php if($this->tabs["id"][$i] != '') echo ' id="'.($this->tabs['id'][$i]).'"'; ?> class="gkTab gkTabs-<?php echo ($i+1) . $active_class; ?>" data-animation="<?php echo $this->tabs['animation'][$i]!= '' ? $this->tabs['animation'][$i] : 'default'; ?>"> 
      <?php if($this->config['tabs_spans'] == '1'): ?><span><?php endif; ?> 
       <?php echo $this->tabs["title"][$i]; ?> 
      <?php if($this->config['tabs_spans'] == '1'): ?></span><?php endif; ?> 
      <span class="simple"></span> 
     </li> 
     <?php endfor; ?> 
    </ol> 

比插入此CSS在CSS文件中:

.gkTabsWrap.horizontal ol li.active .simple { 
    background: url("arrow-ama.png") no-repeat scroll 0px 0 rgba(0, 0, 0, 0) !important; 
    display: block !important; 
    height: 29px; 
    position: absolute; 
    left: -15px; 
    top: 0; 
    width: 15px; 
} 
.simple { 
    display: none; 

} 
1

在這裏你去 與<li<?php if($this->tabs["id"][$i] != '') echo ' id="'.($this->tabs開始是在哪裏添加文本行的結束和類在此行中添加<?php if($this->config['tabs_spans'] == '1'): ?><span class="arr">

<ol class="gkTabsNav"> 
 
     <?php if($this->config['tabs_pre_text'] != '') : ?> 
 
     <li class="gkTabsPreText"><strong><?php echo $this->config['tabs_pre_text']; ?></strong></li> 
 
     <?php endif ; ?> 
 

 
     <?php for($i = 0; $i < count($this->tabs["title"]); $i++) : ?> 
 
     <?php $active_class = ($this->active_tab == $i + 1) ? ' active' : ''; ?> 
 
     <li<?php if($this->tabs["id"][$i] != '') echo ' id="'.($this->tabs['id'][$i]).'"'; ?> class="gkTab gkTabs-<?php echo ($i+1) . $active_class; ?>" data-animation="<?php echo $this->tabs['animation'][$i]!= '' ? $this->tabs['animation'][$i] : 'default'; ?>">asadasadasadasa 
 
      <?php if($this->config['tabs_spans'] == '1'): ?><span class="arr"><?php endif; ?> 
 
       <?php echo $this->tabs["title"][$i]; ?> 
 
      <?php if($this->config['tabs_spans'] == '1'): ?></span><?php endif; ?> 
 
     </li> 
 
     <?php endfor; ?> 
 
</ol>