@@ -95,7 +95,9 @@ public function getCacheKeyInfo()
9595 */
9696 public function getMenuArray ()
9797 {
98- return $ this ->_buildMenuArray ();
98+ $ parent = Mage::getSingleton ('admin/config ' )->getAdminhtmlConfig ()->getNode ('menu ' );
99+
100+ return $ this ->_buildMenuArray ($ parent );
99101 }
100102
101103 /**
@@ -127,12 +129,8 @@ protected function _getHelperValue(Varien_Simplexml_Element $child)
127129 * @param int $level
128130 * @return array
129131 */
130- protected function _buildMenuArray (Varien_Simplexml_Element $ parent= null , $ path ='' , $ level =0 )
132+ protected function _buildMenuArray (Varien_Simplexml_Element $ parent , $ path ='' , $ level =0 )
131133 {
132- if (is_null ($ parent )) {
133- $ parent = Mage::getSingleton ('admin/config ' )->getAdminhtmlConfig ()->getNode ('menu ' );
134- }
135-
136134 $ parentArr = array ();
137135 $ sortOrder = 0 ;
138136 foreach ($ parent ->children () as $ childName => $ child ) {
@@ -167,6 +165,10 @@ protected function _buildMenuArray(Varien_Simplexml_Element $parent=null, $path=
167165
168166 $ menuArr ['level ' ] = $ level ;
169167
168+ if ($ child ->target ) {
169+ $ menuArr ['target ' ] = $ child ->target ;
170+ }
171+
170172 if ($ child ->children ) {
171173 $ menuArr ['children ' ] = $ this ->_buildMenuArray ($ child ->children , $ path .$ childName .'/ ' , $ level +1 );
172174 }
@@ -294,6 +296,7 @@ public function getMenuLevel($menu, $level = 0)
294296 . (!empty ($ level ) && !empty ($ item ['last ' ]) ? ' last ' : '' )
295297 . ' level ' . $ level . '"> <a href=" ' . $ item ['url ' ] . '" '
296298 . (!empty ($ item ['title ' ]) ? 'title=" ' . $ item ['title ' ] . '" ' : '' ) . ' '
299+ . (!empty ($ item ['target ' ]) ? 'target=" ' . $ item ['target ' ] . '" ' : '' ) . ' '
297300 . (!empty ($ item ['click ' ]) ? 'onclick=" ' . $ item ['click ' ] . '" ' : '' ) . ' class=" '
298301 . ($ level === 0 && !empty ($ item ['active ' ]) ? 'active ' : '' ) . '"><span> '
299302 . $ this ->escapeHtml ($ item ['label ' ]) . '</span></a> ' . PHP_EOL ;
0 commit comments