ZF-9277: extend navigation menu for setSeparator() method
Description
For now it is only possible to use the method "setSeparator()" with breadcrumbs. If somebody wants to use navigaton menu with his own style and the method "setPartial()" is used it is very well to have a possibility to set a separator and use it in the view script.
$this->navigation()->menu($container)->setSeparator(">>")->setPartial("any_view_script.phtml")->render();
Comments
Posted by Kai Uwe (kaiuwe) on 2011-01-26T00:31:07.000+0000
Hi Hans, a separator is a good idea. But we need two: one for the whole element and one for list items.
' . self::EOL; } else if ($prevDepth > $depth) { // ... for ($i = $prevDepth; $i > $depth; $i--) { $ind = $indent . str_repeat(' ', $i); $html .= $ind . ' ' . self::EOL; $html .= $ind . '' . self::EOL; } // close previous li tag $html .= $myIndent . ' ' . self::EOL; } else { // close previous li tag $html .= $myIndent . ' ' . self::EOL; }' . $listSeparator; } else if ($prevDepth > $depth) { // ... for ($i = $prevDepth; $i > $depth; $i--) { $ind = $indent . str_repeat(' ', $i); $html .= $ind . ' ' . $listSeparator; $html .= $ind . '' . $separator; } // close previous li tag $html .= $myIndent . ' ' . $listSeparator; } else { // close previous li tag $html .= $myIndent . ' ' . $listSeparator; }These would be also available in your partial scripts.
Posted by Frank Brückner (frosch) on 2011-09-06T08:24:52.000+0000
The separator is an output as "real" content, which the user can see. The same use as in the breadcrumb helper. For the HTML formatting we should use an option "formatOutput" (look at the sitemap helper).
Posted by Frank Brückner (frosch) on 2011-09-06T08:30:36.000+0000
I do not see why we need a separator for a menu! I think we can close this issue. For formatted output, I'll work on: ZF-8874
Posted by Frank Brückner (frosch) on 2011-09-06T08:36:04.000+0000
Feel free to reopen the issue if I have missed something.