2015-07-20 76 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

加里,你是最棒的。这正是我想要做的。 你的代码马上工作。真棒。再次感谢 :) –