Custom Menu starting point from a reference

Hi Neos guys,

I’m discovering Neos since last week and want to congratulate your for the amazing and exciting tool you are creating.
Here is my question.
My root / site node stores “configuration” properties for the whole site, like a reference to the root node storing the footer navigation shortcuts.
I made the Menu works with the following TS :
footerMenu = TYPO3.Neos:Menu { entryLevel = 2 @context.footerNavigationRoot = ${q(site).property('footerNavigationRoot')[0]['nodeData']['properties']['uriPathSegment']} startingPoint = ${q(site).children('[uriPathSegment="' + footerNavigationRoot + '"]').get(0)} }
I guess the “@context.footerNavigationRoot” declaration is not very elegant. Is there any better method to define the startingPoint with this reference to a node ?

Thanks
Thomas

Use a property of type reference to select a document that you can later on use directly in the ts.

footerMenu = TYPO3.Neos:Menu { 
  startingPoint = ${q(site).property('footerNavigationRoot')}
}

YOUR_NODE_TYPE
  properties:
  footerNavigationRoot:
    type: reference
    ui:
      label: 'Footer-Navigation Root'
      inspector:
        group: 'document'
        editorOptions:
          nodeTypes: ['TYPO3.Neos:Document']

see: http://neos.readthedocs.io/en/stable/References/PropertyEditorReference.html#property-type-reference-references-referenceeditor-referenceseditor-reference-selection-editors

Thank you Martin for your detailed answer, it solved the problem.

Use a property of type reference to select a document

My error was here : I used the type “references” … and could not access the property as i expected (array returned).

Thanks
Thomas