Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • kristian schneider 190 posts 351 karma points
    Apr 15, 2010 @ 14:36
    kristian schneider
    0

    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 #.

      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

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Apr 15, 2010 @ 14:55
    Dirk De Grave
    0

    Have a look at this thread, might be of interest to your problem as well

     

    Cheers,

    /Dirk

  • kristian schneider 190 posts 351 karma points
    Apr 19, 2010 @ 07:46
    kristian schneider
    0

    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

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Apr 19, 2010 @ 09:08
    Dirk De Grave
    0

    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

  • kristian schneider 190 posts 351 karma points
    Apr 19, 2010 @ 10:02
    kristian schneider
    0

    That did the trick!

    Thanks for your help, karma comming you way

    Best Regards

    Kristian

Please Sign in or register to post replies

Write your reply to:

Draft