Seems to work fine from here, what exactly is the problem? Also not sure why you're writing @item2.ToString(), guessing just for testing? Normally you'd be writing a property like it's name etc @item2.Name
Turns the problem was completely unrelated to razor.
I used the Content Maintenance Dashboard to move all the child nodes. Looked fine in the backend, but apparently the document cache hadn't updated like it should have.
After a republish the code worked just fine.
Have had this problem with my own move-nodes-code before. Very annoying...
Children of Child?
Heya
Maybe this is me beeing a complete retard, but shouldnt this work?
Should give me current pages children (works) and their respective children (doesnt work)
I have tried a ton of variants but none work.
new DynamicNode(item.Id).GetChildrenAsList for example... no go.
What is the proper way?
/Hannes
Hi Hannes,
I don't know if this will help, but I think your "foreach" should have only one "@", so like this :
Also, have you tried with "Descendants" instead of "Children"?
Cheers,
Michael.
Hi Hannes,
Seems to work fine from here, what exactly is the problem? Also not sure why you're writing @item2.ToString(), guessing just for testing? Normally you'd be writing a property like it's name etc @item2.Name
-Tom
Turns the problem was completely unrelated to razor.
I used the Content Maintenance Dashboard to move all the child nodes.
Looked fine in the backend, but apparently the document cache hadn't updated like it should have.
After a republish the code worked just fine.
Have had this problem with my own move-nodes-code before. Very annoying...
Thanks guys!
/Hannes
is working on a reply...