I have a list of accommodation nodes with room types as child nodes. For example:
Hilton Hotel - Standard Room - Deluxe Room
When I output the hotels using a foreach loop I can orderby properties of the hotel such as name and star rating but how would I go about sorting based on the price, which is held in the room type nodes?
Orderby subquery?
I have a list of accommodation nodes with room types as child nodes. For example:
Hilton Hotel
- Standard Room
- Deluxe Room
When I output the hotels using a foreach loop I can orderby properties of the hotel such as name and star rating but how would I go about sorting based on the price, which is held in the room type nodes?
Thanks in advance for any help :)
Mark
in umbraco v 4.7.2
Hi Mark,
I think you should create Dictionery List with nodeId , your price based on type nodes.
When run trow all node with foreach you can add item with nodeId , price value based on typeNode.
Then you can order this list by the value and run trow with forEach again.
Hope that help. Cheers
Thanks, I got it working as per your suggestion :)
is working on a reply...