Issues with using the Neos Menu

I am having two issues with the Neos Menu:

  1. I need a Menu including “Home”.
  2. “Home” and the others should be highlighted by a class of my own choice, when active.

About: 1. When following the Neos.Demo it uses a Shortcut to link to the site root. Because of that setup “Home” never get highlighted as current/active because it linked to the “root”, how to solve this?

About: 2. I am experimenting the same as @T_B (see link below) when trying to manipulate the current class, looking at the Fusion Reference and at Neos.Fusion:Attributes I would assume that: current.attributes.class = 'acitve'inside the Fusion code of the Menu should give me the expected results, what am I missing here?


Related topic:

Short answer:

  1. You can invert this for example and make the root page a shortcut. Then state should work out.

  2. current.attributes should work. Doesn’t it? What happens instead? Also do you use the default template?
    If it doesn’t work please open a bug report, we will investigate then.

Hey Christian (@christianm),

thanks for your answer!
Let me ask more about No. 1, your suggestion made me to get more into the by default (setup) defined site root which is a normal Neos.NodeTypes:Page I guess? Where and how it is defined is still a little mysterious to me?? I like the idea to make a Shortcut out of it, but then other issues come up:

  1. Home is active in the menu now, but I would have it in the URL as well, which would be okay for now but not really what I need in general.

  2. Accessing the Footer-ContentCollection gives me difficulties! I am following the documentary to create it (Shared Footer), now since my site/root is only a Shortcut to the next page “home”, I need to access the Footer through finding the subpage first, as suggested in the last sentence in the Docs. To be precise how do these lines have to look to access the Footer on the Page: “home”?

     footer  = Neos.Neos:ContentCollection {
         nodePath = ${q(site).find('home').children('footer').property('_path')}
         collection = ${q(site).find('home').children('footer').children()}

There are a couple of Discussions about this topic but none really answers the Exception some of us are facing… (eg.: Shared Footer I have tried variants of this too. It’s just still a little difficult to separate between my own incompetence and actual bugs in the System…

I can just guess, but it all seems to be related to the site error… When you install a Neos 3.1.1 without the Demo-Site and then run the “./flow node:repair” it shows a “Sites-Error” straight away!??

Right now I keep crashing my Neos, while trying to get some basic things to work. Many times I end up deleting my database just to make sure to start from scratch… I will split up those issues into smaller topics, but they keep coming up in relation to each other… I love Neos and while I got a lot working already keep realizing that I don’t really control the System yet (wanting to use it in production very very soon…)


What works are those two to get the nodepath:

    nodePath = ${q(site).find('node-x75qsinc8t32z').children('footer').property('_path')}
    nodePath = ${q(site).find('[instanceof webappcreations.diessbacherbablDe:Home]').children('footer').property('_path')}

That is the identifier of the Page with the Title and Url of “home” so I don’t understand why this doesn’t work:

nodePath = ${q(site).find('home').children('footer').property('_path')}

I guess my assumption that the “page named” in the Docs, refers to the Neos NodeType and not the Url!? :

Of course you have to update the selection in the example if your footer is not stored on the site root, but for example on a page named ‘my-page’. The selection would then be: ${q(site).find(‘my-page’).children(‘footer’).children()}.

The docu isn’t correct here. Pages aren’t named by their uriPathSegment any more. To select them you need to use

nodePath = ${q(site).find('[uriPathSegment="your-uri-path-segment"]').children('footer').property('_path')}

or the ways you already described in your reply. If passing a string, this only works if the last part of the path is exactly the same (so ‘page’ would work if your path is sth. like ‘/sites/site/node-lhehufle/page’ or sth).

This needs to be fixed in the docs. Maybe also some other outputs need to be fixed, but i need to test it first to give you further information on this.

1 Like