Copied to clipboard

Flag this post as spam?

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


  • Jon 92 posts 166 karma points
    Feb 08, 2021 @ 15:04
    Jon
    0

    Get Page URL in ContentService.Moving Event

    Hi,

    I was wondering how I can get the URL of a page that I am moving. I need to have the URL before and after i move a page so I can update a search Index.

    Currently I am hooking into the ContentService.Moving event but the current page and it's child pages have a URL of '#'.

    On ContentService.Moved the page has a URL so that bit iss fine - I just need the Moving "Old" URL.

    Any ideas?

    Thanks

  • Malthe Petersen 68 posts 383 karma points c-trib
    Feb 08, 2021 @ 17:49
    Malthe Petersen
    0

    Hi Jon.

    Have you tried fetching the content from the Cache in the moving event? I would guess that the cache has not yet refreshed and therefor the content would have the old URL.

    Then when you have finished what you need to finish, the cache refresher event would fire, and you can get the new URL of your content and reindex it.

    Not sure whether it is possible, as I am not 100% sure that the events would fire in the right order, but worth a try. :-)

Please Sign in or register to post replies

Write your reply to:

Draft