MetaNavigation with few «specific» pages/shortcuts

Hi together,
I’m looking for an approach to build an MetaMenu with specific pages/shortcuts. Like for the «legal-part» in each website in the footer area like:
###Terms of Service | Privacy Policy | Inprint | Sitemap | Search
Also important: This Pages/Links should not appear in MainMenu.

My solution:
I Extend «TYPO3.Neos.NodeTypes:Page» and «TYPO3.Neos:Shortcut» with properties from type boolean:

  • pageNotInMainMenu
  • pageForExtendedMenu

In my MenuTemplates I do an if-condition to render or not, depend on checked or uncheched box in Backend for «show this in ExtendMenu» or «show this NOT in MainMenu».
Works fine, BUT now I have to have more than one additional/extended Menu. There are more than 5, and in Backend it will soon cluttered with. Because I can’t fade out all this checkboxes by default with only one dependingProperties checkbox like a «[ ] show Menu-Selection-Options» .

So it looks messy in all pages/shortcuts like this:
[ ] «show this NOT in MainMenu»
[ ] «show this in ExtendMenu 1»
[ ] «show this in ExtendMenu 2»
[ ] «show this in ExtendMenu 3»

#My questions:
- Is there a build-in approach/solution to select only particular pages/shortcuts for predefined Menu-constructions, prototypes, templates, a MenuBuild-Plugin/Widget or something like this?
- Do you know a package for this need?
- Do you know a matching docu-page or tutorial?
- Do you know a more simple or better working solution for this need?

(But not for the most-simple situation like in the docu, where only do split the menu-depth depend on nesting/hirarchy with the entryLevel!)

Would be great if you would share your solution!
Thank you

Hi,
found a better solution in the Neos’ Demo-Page.
And Yes: I would say, there is a build-in solution. Now I’ve got it!
Maybe the follow information will guide Google easier to the solution. :persevere::
(all is out from the neos.demoPage only a bit adapted and with explanation relined.

# /Resources/Private/TypoScript/Root.ts2

body {
   parts {         
      metaMenu = Menu {
         entryLevel = 2
         templatePath = 'resource://Neos.Demo/Private/Templates/TypoScriptObjects/MetaMenu.html'
         maximumLevels = 1
         startingPoint = ${q(site).children('metamenu').get(0)}
      }
      legal = Menu {
         entryLevel = 2
         templatePath = 'resource://Neos.Demo/Private/Templates/TypoScriptObjects/MetaMenu.html'
         maximumLevels = 1
         startingPoint = ${q(site).children('node-5761272e6ab87').get(0)}
      }     
   }
}
```

```ruby
# /Resources/Private/Templates/Page/Default.html

<footer role="navigation" class="navbar navbar-default">
   <div class="panel panel-default">
      <div class="panel-body clearfix">
         <div class="container">
            {parts.metaMenu -> f:format.raw()}
         </div>
         <div class="container">
            {parts.legal -> f:format.raw()}
         </div>
      </div>
      <div class="panel-footer">
         <div class="container">
            {footer -> f:format.raw()}
         </div>
      </div>
   </div>
</footer>
```

```html
# /Resources/Private/Templates/TypoScriptObjects/MetaMenu.html

{namespace neos=TYPO3\Neos\ViewHelpers}
<f:render section="itemList" arguments="{items: items}" />

<f:section name="itemList">
   <nav class="nav" role="navigation">
      <ul class="nav nav-pills">
         <f:for each="{items}" as="item" iteration="menuItemIterator">
            <li class="{item.state}">
               <neos:link.node node="{item.node}">{item.label}</neos:link.node>
            </li>
         </f:for>
      </ul>
   </nav>
</f:section>

```

<img src="//assets-discuss-neos-io.s3-eu-central-1.amazonaws.com/original/2X/6/6048dbc9fcb0eac96a78728a85f1c77911e02ef5.png" width="690" height="236">

In Backend create as many MetaNavigations you need[#1,#2, ...].Add SubPages for the needed links in the MetaNavigation. Select the «Hide in Menu» Checkbox [#3]. Use in roots.ts2's children() the node name [#4].
Tada -> it works [#5]!

***(For existing Pages, also shown in MainMenu create a shortcut in the Metamenu or Legal and use the target-field to the desired page.)***

Clean and easy built-in. Hope it helps!
Cheers Martin

Hi mad,

thanks for this post.

Do you know how I can set the name of the node? Because on the NeosDemo Site its called ‘metamenu’ in the inspector (your screenshot #4). But in your new node “Legel” there is only the Name 'node-5761272e6ab87’
I would like rename the node-xxxxxxx in a name like ‘legal’ oder ‘header menu’.

Hey @stefkey,
would be also interested in.
I found neither a name entry in the database, nor I know, how to change the name of a node. Looks like an hash-value; But why in demo all Name are readable names?
Maybe there is a flag somewhere in Neos/Flow to have the possibility to set an own defined name per node.
Would great to have this possibility, because of easier readable ts2 logic in further future. Code would have been much self-explanatory!

For safety reasons you cannot edit node names via the UI. You can enable that though, but I suggest doing that only in the inital setup. What the demo site does and what I recommend is using the Sites.xml to import a basic skeleton structure for the website and having defined names in there. (As in you know you need a meta and a footer navigation so you include those nodes already in your sites.xml).