+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Move many pages from one Master page to another

Move many pages from one Master page to another

3 posts, 0 answered
  1. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    05 Oct 2010
    Link to this post
    Hi Guys,

    I have about 80 pages in my site that I need to move from one Master Page template to another. Is there a quick way I can do this without deprecating all the pages?

    Thanks,
    James
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    05 Oct 2010
    Link to this post
    Hello James,

    There is a method of StagedPage - SetTemplate that you can use to set the template of these pages. You need to create a list of pages and loop through them. Then call GetPage( id, true) method of the CmsManager and for each page get a reference to the Staged version. Call SetTemplate and pass the parameters to this method. Finally call SavePage method of the CmsManager .

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    05 Oct 2010
    Link to this post
    Thanks Ivan, I will try this.

    Cheers,
    James
Register for webinar
3 posts, 0 answered