2016-06-16 13 views
0

PrestaShopの管理ページ(管理者用カスタムモジュール)の現在のインデックスに新しいパラメータを追加するにはどうすればよいですか?PrestaShopの現在のインデックスに新しいパラメータを追加するにはどうすればよいですか?

私は次のことを試してみましたが、それは働いていない:私は必要なもの

$this->setcurrentindex=$this->setcurrentindex.'&view=querydrlog'; 

は次のとおりです。

http://localhost/raffleV1.3/oknr9hexztcseff5/index.php?controller=query&view=querydrlog&token=d81fcd49d179ae13444df0e8b2cccec6 

私はascや改ページの一部USLをクリックするとは、次のとおりです。

http://localhost/raffleV1.3/oknr9hexztcseff5/index.php?controller=query&kits_query_drOrderby=id_query_dr&kits_query_drOrderway=desc&token=d81fcd49d179ae13444df0e8b2cccec6 

上記のURLに'&view=querydrlog';を追加して、ページングのd ascは正しく動作します。

答えて

2

AdminControllerinit()機能を無効にすることで、モジュール管理コントローラで行うことができます。

class YourAdminModuleController extends ModuleAdminController { 
    protected $extra_params = '&view=querydrlog'; 

    public function init() { 
     parent::init(); 
     self::$currentIndex .= $this->extra_params; 
     $this->context->smarty->assign('current', self::$currentIndex); 
    } 
} 

これは、パラメータをリンクのhrefsまたはページングフォームのアクションリンクにソートするために追加します。

関連する問題