public function beginMenu($name = null, $url = null, $options = [],
                              $linkOptions = [], $listOptions = []) {
        $template = 'outerMenuStart';
        $templateOptions = [];
        if (is_array($name)) {
            $options = $name;
        }
        $options += [
            'templateVars' => []
        ];
        if ($this->_level == 1) {
            $linkOptions += [
                'caret' => '<span class="caret"></span>'
            ];
            $template = 'innerMenuStart';
            $templateOptions['dropdownLink'] = $this->formatTemplate('dropdownLink', [
                'content' => $name,
                'caret' => $linkOptions['caret'],
                'url' => $url ? $this->Url->build($url) : '#',
                'attrs' => $this->templater()->formatAttributes($linkOptions, ['caret'])
            ]);
            $templateOptions['dropdownMenuStart'] = $this->formatTemplate('dropdownMenuStart', [
                'attrs' => $this->templater()->formatAttributes($listOptions)
            ]);
        }
        $this->_level += 1;
        return $this->formatTemplate($template, $templateOptions + [
            'attrs' => $this->templater()->formatAttributes($options),
            'templateVars' => $options['templateVars']
        ]);
    }