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