Dynamic loading of menu options seems not to respect order of results from cypher

StackOverflow https://stackoverflow.com/questions/23316409

  •  10-07-2023
  •  | 
  •  

Pergunta

I'm trying to influence the order of navigation menu options by setting Page.Position to 1 and 2 and providing this cypher

start n=node:keywordAllNodes(type='Page') return n order by n.Position ;

but it does not seem to make a difference. What is the correct way of doing this?

Foi útil?

Solução

The property names are all lowercase, just displayed 'titleized'.

With Neo4j 2.0, you can write the query as

MATCH (n:Page) RETURN n ORDER BY n.position

Of course, all position properties have to be set in order to make sorting work.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top