Try our conversational search powered by Generative AI!

Change UrlSegment after page-move


My problem is that I'm having a hard time changing the UrlSegment on a writable clone.

I have an article-system in EPi, where each article-page is structured in a "year-month"-folderstructure like so:

  • Year
    • Month
      • Article 1
      • Article 2

Each article is created programmatically and inserted into the structure based on publishdate. My problem is that the admin can change the publishdate and thus I haveto move the page to the correct month/year structure. When that happens there might already be a article with the same name in that folder, so I haveto change the UrlSegment on the page I'm moving.

The problem is that the writable clone I create doesn't get a new unique segment when calling CreateUrlSegment() or GetUniqueURLSegment(). I've tried setting the URLSegment of the writable clone to null before calling the function but it is still the same.

Any thoughs/tips on this?

Apr 18, 2012 10:27


I think EPiServer already handles this case. If there is a page with the same name already the moved page urlsegment is suffixed with a number.

Apr 18, 2012 10:50
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.