My problem is that I can't figure out how to show all children under (Cast, Crew, Scenes) my code only render out the children from the first category (Cast).
When you want the children and grandchildren of an item you can use the Descendants(); method. And I assume that you content is structured so the items in children under your home item.
If so then I think something like this should work for you, if the item has it own document type.
Show all children from different categories
Hi,
I have this structure on my site:
-- Home
-- Cast & Crew (doctype: Portfolio)
-- Cast (doctype: PortfolioType)
-- Child 1
-- Child 2
-- Crew (doctype: PortfolioType)
-- Child 1
-- Child 2
-- Scenes (doctype: PortfolioType)
-- Child 1
-- Child 2
Child 1 + 2 can have different doctypes.
My problem is that I can't figure out how to show all children under (Cast, Crew, Scenes) my code only render out the children from the first category (Cast).
My code looks like this:
Thanks in advance!
// René
Hi René,
When you want the children and grandchildren of an item you can use the Descendants(); method. And I assume that you content is structured so the items in children under your home item.
If so then I think something like this should work for you, if the item has it own document type.
Remember to change the "DocumentTypeAlias" so it match your case.
Hope this helps,
/Dennis
Hi Dennis,
Once again you solved my problem. Very nice solution.
Thank you!
// René
is working on a reply...