Skip to content

Instantly share code, notes, and snippets.

@kmtr
Created May 31, 2012 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmtr/2843743 to your computer and use it in GitHub Desktop.
Save kmtr/2843743 to your computer and use it in GitHub Desktop.
# 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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment