I am using a partial view to pull in the contents of the folders which is the child element of the node, to display on 'Page One' and 'Page Two' but it is pulling through all 4 (tiles) when I am calling the partial view.
I think it is because I am using descendants instead of children but I am unsure of how to change this...Can someone help me with using Children() instead of descendants.
How to call Children() not descendants()?
I have a structure like below
Page One
-- Folder
--- CatOne (tiles)
--- CatTwo (tiles)
Page Two
--Folder
---CatOneB (tiles)
---CatTwoB (tiles)
I am using a partial view to pull in the contents of the folders which is the child element of the node, to display on 'Page One' and 'Page Two' but it is pulling through all 4 (tiles) when I am calling the partial view.
I think it is because I am using descendants instead of children but I am unsure of how to change this...Can someone help me with using Children() instead of descendants.
Thanks
Hi Kyle,
Did you solve your problem?
Read documentation about traversing in Umbraco
https://our.umbraco.org/documentation/reference/templating/mvc/querying
If you want children nodes:
Thanks,
Alex
Hi Alex,
Thank you - yes I did manage to get it working using the below -
To look at the first child of document type folders and then looked for the children of that doc type to get the tiles.
Great, Kyle!
Mark topic as solved if it is, it will be better for other developers who have the same problem.
is working on a reply...