2015-07-20 104 views
0

我在prestashop中有一個自定義管理頁面,我想在該頁面的底部添加一個URL鏈接。但是,我對prestashop非常陌生,無法弄清楚如何做到這一點。Prestashop,在後臺標籤中添加超鏈接到網站

我有一個模塊的管理員控制器文件,用於創建帶有窗體的自定義頁面,並且想知道如何在頁面底部添加一個鏈接,該鏈接可以簡單地轉到網站上的另一個靜態頁面,甚至一個外部頁面。

AdminFedeltaSchoolsController.php內容

<?php 
class AdminFedeltaSchoolsController extends ModuleAdminController { 

    public function __construct() { 

     // Configure admin controller with table, model, language and bootstrap theme 
     $this->table = 'fedeltapos_school'; 
     $this->className = 'FedeltaposModel'; 
     $this->lang = true; 
     $this->bootstrap = true; 

     // Generat action on list 
     $this->addRowAction('edit'); 
     $this->addRowAction('delete'); 
     // This adds a multiple deletion button 
     $this->bulk_actions = array(
      'delete' => array(
       'text' => $this->l('Delete selected'), 
       'confirm' => $this->l('Delete selected items?') 
      ) 
     ); 
     // Generat list 
     $this->fields_list = array(
      'id_fedeltapos_school' => array(
       'title' => $this->l('ID'), 
       'align' => 'center', 
       'width' => 25 
      ), 
      'school_name' => array(
       'title' => $this->l('School Name'), 
       'width' => 'auto' 
      ), 
      'delivery' => array(
       'title' => $this->l('Delivery'), 
       'width' => 'auto' 
      ), 
      'pickup' => array(
       'title' => $this->l('Pickup'), 
       'width' => 'auto' 
      ), 
      'pricelevel' => array(
       'title' => $this->l('Price Level'), 
       'width' => 'auto', 
      ), 
     ); 

     parent::__construct(); 
    } 

    // This method generates the Add/Edit form 
    public function renderForm() { 
     // Building the Add/Edit form 
     $this->fields_form = array(
      'legend' => array(
       'title' => $this->l('Schools'), 
       'icon' => 'icon-envelope-alt' 
      ), 
      'input' => array(
       array(
        'type' => 'text', 
        'label' => $this->l('School Name:'), 
        'name' => 'school_name', 
        'lang' => true, 
        'size' => 33, 
        'required' => true, 
       ), array(
        'type' => 'text', 
        'label' => $this->l('Delivery:'), 
        'name' => 'delivery', 
        'size' => 33, 
        'required' => true, 
       ), 
       array(
        'type' => 'text', 
        'label' => $this->l('Pickup:'), 
        'name' => 'pickup', 
        'size' => 33, 
        'required' => true, 
       ), 
       array(
        'type' => 'text', 
        'label' => $this->l('Price Level:'), 
        'name' => 'pricelevel', 
        'size' => 33, 
        'required' => true, 
       ), 
      ), 
      'submit' => array(
       'title' => $this->l('Save') 
      ) 
     ); 
     return parent::renderForm(); 
    } 
} 

我想在頁面底部的鏈接(見截圖): http://awesomescreenshot.com/08252wdh8a

任何援助將不勝感激。

+0

不要忘記檢查你的問題答案連接。 – belford

回答

1

覆蓋管理控制器的默認內容管理模板文件。

創建/your-admin-folder/themes/default/template/controllers/fedelta_schools/content.tpl

{if isset($content)} 
    {$content} 
{/if} 

{block name="override_tpl_schools"} 
    <div class="row"> 
     <div class="col-lg-12"> 
      <div class="panel"> 
       <h3> 
        <i class="icon-info"></i> 
        {l s='Help'} 
       </h3> 
       <p>{l s='You can find answer of your question here :'} <a href='#'>{l s='FAQ'}</a> </p> 
      </div> 
     </div> 
    </div>  
{/block} 
+0

加里,你是最棒的。這正是我想要做的。 你的代碼馬上工作。真棒。再次感謝 :) –