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
I'm hooking into the
private void ContentServicePublished(IPublishingStrategy sender, PublishEventArgs<IContent> args)
and want to get the ordinal position of each node in args.PublishedEntities (i.e. so I know that this node is the 3rd child in the tree.
args.PublishedEntities
Is there a way to do that?
Hi
i think you can access the sortOrder value to see where something is in a list.
foreach (var item in args.PublishedEntities) { var order = item.SortOrder }
I think that should give you the position of the item in the tree.
Many thanks for that - worked perfectly (apologies for the delay in replying - got dragged onto something else for a bit!)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Ordinal Position of node during publish
I'm hooking into the
and want to get the ordinal position of each node in
args.PublishedEntities
(i.e. so I know that this node is the 3rd child in the tree.Is there a way to do that?
Hi
i think you can access the sortOrder value to see where something is in a list.
I think that should give you the position of the item in the tree.
Many thanks for that - worked perfectly (apologies for the delay in replying - got dragged onto something else for a bit!)
is working on a reply...