ZF-10282: no active page children if minDepth > active depth
Description
Consider this code:
$this->navigation()->menu()->setMinDepth($minDepth);
$this->navigation()->menu()->setOnlyActiveBranch(true);
echo $this->navigation()->menu();
and the container shown below for readability.
If {{$minDepth}} is 1 the view helper will render: * L'Istituto <--- this is the active page, depth 1 ** Organizzazione ** AttivitÃ
If {{$minDepth}} is 2 the view helper will render... nothing.
This is quite strange. If "onlyActiveBranch" means "only active branch and children", when {{$minDepth}} is 2 I should still see the submenu. If "onlyActiveBranch" means "only active branch and no children", I should see no children even when {{$minDepth}} is 1. The first meaning ("only active branch and children") should be valid, in my opinion.
Here is the dump of the container (toArray):
Array
(
[0] => Array
(
[label] => Pagina iniziale
[id] =>
[class] =>
[title] =>
[target] =>
[rel] => Array
(
)
[rev] => Array
(
)
[order] =>
[resource] =>
[privilege] =>
[active] =>
[visible] => 1
[type] => Zend_Navigation_Page_Uri
[pages] => Array
(
[0] => Array
(
[label] => L'Istituto
[id] => 51
[class] =>
[title] =>
[target] =>
[rel] => Array
(
)
[rev] => Array
(
)
[order] =>
[resource] =>
[privilege] =>
[active] => 1
[visible] => 1
[type] => Zend_Navigation_Page_Uri
[pages] => Array
(
[0] => Array
(
[label] => Organizzazione
[id] => 69
[class] =>
[title] =>
[target] =>
[rel] => Array
(
)
[rev] => Array
(
)
[order] =>
[resource] =>
[privilege] =>
[active] =>
[visible] => 1
[type] => Zend_Navigation_Page_Uri
[pages] => Array
(
)
[uri] => /it/L%27Istituto/Organizzazione
)
[1] => Array
(
[label] => AttivitÃ
[id] => 73
[class] =>
[title] =>
[target] =>
[rel] => Array
(
)
[rev] => Array
(
)
[order] =>
[resource] =>
[privilege] =>
[active] =>
[visible] => 1
[type] => Zend_Navigation_Page_Uri
[pages] => Array
(
)
[uri] => /it/L%27Istituto/Attivit%C3%A0
)
)
[uri] => /it/L%27Istituto
)
[...]
Comments
No comments to display