Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello,
I have a content picker on a parent node which has many child nodes.
The content picker lets you select on of the children.
In the view i want to order the children and set the one chosen in the content picker as first.
Is there a way to do this?
Cheers,
J
Trying something like:
var node = Umbraco.Content(CurrentPage.contentPicker); selection = CurrentPage.Children.Where("Visible").OrderBy("@0", node.Id);
This would be perfect but orderby doesn't work in this way :(
Hi James,
What if you do some thing like this would this work for you.
var node = Umbraco.Content(CurrentPage.contentPicker); selection = CurrentPage.Children.Where("Visible").OrderBy("Id == @0", node.Id);
Hope this helps,
/Dennis
Ignore me:
.OrderBy(node.Id);
Sorted.
Thanks Dennis
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Ordering base on Parent Content picker
Hello,
I have a content picker on a parent node which has many child nodes.
The content picker lets you select on of the children.
In the view i want to order the children and set the one chosen in the content picker as first.
Is there a way to do this?
Cheers,
J
Trying something like:
This would be perfect but orderby doesn't work in this way :(
Hi James,
What if you do some thing like this would this work for you.
Hope this helps,
/Dennis
Ignore me:
Sorted.
Thanks Dennis
is working on a reply...