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
Hi.
Im doing some custom lucene indexing and for that I need to know the niceurl of the document when it is published.
I do this by hooking up to the Document_AfterPublish event and then trying to get the node of the publish document.
That works. But the niceurl in the node is wrong, when I ask for it I get a #.
static void Document_AfterPublish(Document sender, umbraco.cms.businesslogic.UnPublishEventArgs e) { var node = new Node(sender.Id); var url = node.NiceUrl;
When is the niceUrl ready or can I get it some other way?
regards Kristian
Have a look at this thread, might be of interest to your problem as well
Cheers,
/Dirk
Hi Dick.
I've tried to search for the AfterDocumentUpdateCache event, but cannot seem to find it anywhere.
Could you elaborate on where I can find it?
/Kristian
Here's the overview of all events that are triggered in the umbraco system... so you should subscribe to the Content.AfterUpdateDocumentCache event.
Hope this helps.
Regards,
That did the trick!
Thanks for your help, karma comming you way
Best Regards
Kristian
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Problem with niceurl when publishing new document
Hi.
Im doing some custom lucene indexing and for that I need to know the niceurl of the document when it is published.
I do this by hooking up to the Document_AfterPublish event and then trying to get the node of the publish document.
That works. But the niceurl in the node is wrong, when I ask for it I get a #.
When is the niceUrl ready or can I get it some other way?
regards Kristian
Have a look at this thread, might be of interest to your problem as well
Cheers,
/Dirk
Hi Dick.
I've tried to search for the AfterDocumentUpdateCache event, but cannot seem to find it anywhere.
Could you elaborate on where I can find it?
/Kristian
Here's the overview of all events that are triggered in the umbraco system... so you should subscribe to the Content.AfterUpdateDocumentCache event.
Hope this helps.
Regards,
/Dirk
That did the trick!
Thanks for your help, karma comming you way
Best Regards
Kristian
is working on a reply...