2011-05-12 22 views
1

沒有人知道如何(重新)代碼的某一類別的限制,以顯示HREF鏈接,而不是下拉場?Magento的工具欄 - >限制

我的意思是這樣的: http://cl.ly/2T2i2T2g0k3n0i2N0b2c

,我想它重新編碼來: http://cl.ly/2O1e0L1c1i24361t3Z3v

只是想變換下拉到一些簡單的HTML鏈接,但...

我,完全有能力做到這一點,但我不是在Magento的專家,我只是覺得,我不能硬連接它像在源代碼www.store.com/category.html?limit=12。我需要返回我的類別URL的功能。

有誰知道如何編寫代碼呢?

回答

1

很容易。

轉到/app/design/frontend/[your-interface]/[your-theme]/template/page/html/pager.phtml並替換此代碼:

<select onchange="setLocation(this.value)"> 
    <?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?> 
     <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>> 
      <?php echo $_limit ?> 
     </option> 
    <?php endforeach; ?> 
    </select> <?php echo $this->__('per page') ?> 

蒙山這樣的:

<?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?> 
    <a href="<?php echo $this->getLimitUrl($_key) ?>"><?php echo $_limit ?></a> &nbsp; 
    <?php endforeach; ?> 
    <?php echo $this->__('per page') ?> 
+1

它到底WASN你描述(這是在我的情況下,目錄/列表/ toolbar.phtml)的位置,但是這個代碼工作完美。謝謝! – Marek123 2011-05-12 13:45:36

+0

那是因爲你需要自己創建文件文件夾內。它存在於基礎,而不是你的主題。 – danchet 2012-01-05 21:23:17