How to get the identifier of the node?

I want to build a Tabpanel-Componet. In my ContentCollection of panels I can get the identifier with ${q(node).property('_identifier')}. But in my tab list I get the title of my panel, but not the identifier.

  items = ${q(node).children()}
  renderer = afx`
    <ul class="tabs">
      <Neos.Fusion:Loop items={props.items} itemName="item">
        <li><button aria-controls={item.properties._identifier}>{item.properties.title}</button></li>
      </Neos.Fusion:Loop>
    </ul>
  `

You should use node.identifier.

Identifier, hidden, etc. are attributes of a node and not like the properties you declare via the nodetype.

q(node).property('_hidden') still let’s you access them via a “magic trick”, but you cannot access via properties, as this array doesn’t contain them.
And for (slight) performance reasons you shouldn’t use node.properties and use q(node).property(‘myProp’) instead.

2 Likes

This worked.
Thank you for the explanation.

and i would prefer node.identifier over q(node).property('_identifier') ^^