changing the default url of migrated pages

Posted by Community Admin on 04-Aug-2018 19:00

changing the default url of migrated pages

All Replies

Posted by Community Admin on 17-Apr-2012 00:00

Hi,

I want to change the default url of the migrated pages. I would like to make them extension less. How do I do that?

Thanks,
Annie

Posted by Community Admin on 17-Apr-2012 00:00

annie,

the extension is stored in the PageNode under the Extensions property, You should be able to remove it with something like this:

using (var api = App.WorkWith())
    var pages = api.Pages().LocatedIn(PageLocation.Frontend).ThatArePublished()
        .ForEach(page =>
        
            page.Extension = null;
        ).SaveChanges();

You can place this on a regular webforms page codebehind like test.aspx and run it to update the site. As always, be sure to backup the site first just in case.

hope this is helpful!

Posted by Community Admin on 18-Apr-2012 00:00

Thanks SelArom, I will try that

This thread is closed