I am currently working on a site on which I have created an automatic archiving process via an event which will move old articles out of a News node and in to a News Archive structure. The moving of the documents has gone very well, however it has thrown up a couple of problems.
First of all, the node tree doesn't update when the event happens (it is part of a Before Publish event). We see the newly published document in the News node as would be expected, but any documents which should have been archived remain in view until the Tree is refreshed. I have seen in a few places that umbraco.library.RefreshContent solves this, but it appears to make no difference wether called before or after publish.
Secondly, the Sort Order of the news node has gaps in it after archiving (ie instead of reading 0, 1, 2 etc it will be something like 0, 2, 3 depending on the documents archived). Is there any way this can automatically update to eliminate the gaps?
Node Tree and Sort Order question
Hi Everyone,
I am currently working on a site on which I have created an automatic archiving process via an event which will move old articles out of a News node and in to a News Archive structure. The moving of the documents has gone very well, however it has thrown up a couple of problems.
First of all, the node tree doesn't update when the event happens (it is part of a Before Publish event). We see the newly published document in the News node as would be expected, but any documents which should have been archived remain in view until the Tree is refreshed. I have seen in a few places that umbraco.library.RefreshContent solves this, but it appears to make no difference wether called before or after publish.
Secondly, the Sort Order of the news node has gaps in it after archiving (ie instead of reading 0, 1, 2 etc it will be something like 0, 2, 3 depending on the documents archived). Is there any way this can automatically update to eliminate the gaps?
Thanks in advance,
Rob
is working on a reply...