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

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

  •  10-07-2023
  •  | 
  •  

質問

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?

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top