プロジェクト

全般

プロフィール

Bug(バグ) #3293

光 野澤11年以上前に更新

h3. 現象 

OpenPNE 3.8 pc module.ymlでnavを設定しても反映されない

h3. 詳細

# OpenPNE3/apps/pc_frontend/modules/community/config/module.ymlを見る限り、default_nav: <localNav type> で、
# そのmoduleで標準で使われるlocalNavのtypeを、nav: {<action>: <localNav type>} で、各action毎のlocalNavを
# 設定できるようになっていると期待されるが、実際にはdefault_navしか使われていない。
# 以下のようにコードを加えると、nav: {<action>: <localNav type>} も使用されるようになる。



--- OpenPNE3/apps/pc_frontend/modules/default/actions/components.class.php Thu May 31 19:53:52 2012
+++ OpenPNE3/apps/pc_frontend/modules/default/actions/components.class_fix.php Thu May 31 19:55:29 2012
@@ -30,6 +30,7 @@


$action = $context->getActionStack()->getLastEntry()->getActionName();



$this->type = sfConfig::get('sf_nav_type', sfConfig::get('mod_' . $module . '_default_nav', 'default'));
+ $this->type = sfConfig::get('sf_nav_type', sfConfig::get('mod_' . $module . '_nav_' . $action, $this->type));



$this->navs = Doctrine::getTable('Navigation')->retrieveByType($this->type);

h3. 転載元

このバグチケットは、以下の報告の転載です。
gist.github.com/2843743

戻る