November Happy Hour will be moved to Thursday December 5th.

Change UrlSegment after page-move

Vote:
 

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?

#58291
Apr 18, 2012 10:27
Vote:
 

Hi,


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.

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