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

Forums / General Discussions / how to Duplicate Page group including all pages

how to Duplicate Page group including all pages

5 posts, 0 answered
  1. sameer
    sameer avatar
    14 posts
    Registered:
    28 Apr 2009
    02 Dec 2009
    Link to this post
    hi
    i created new website and under All Pages i have 2 Pagegroup it's name (Arabic - English)
    i finished English website and created all the pages under it and finished add controls , tamplates ... etc
    i want to ask if i can copy English (Page group including all pages under it) ? to create Arabic site easily

    attention English site content NOT the same for Arabic site so i cann't use Externalpage
     
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Dec 2009
    Link to this post
    Hi sameer,

    When you duplicate a group page its child nodes should also be copied. You may find the following article useful Automatically create other language versions of the page using Sitefinity API

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. sameer
    sameer avatar
    14 posts
    Registered:
    28 Apr 2009
    02 Dec 2009
    Link to this post
    hi lvan
    thanks for your fast support
    realy i tried meany times to copy group page  but it's copid without his nodes
    are you have any suggestions?

    thanks
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Dec 2009
    Link to this post
    Hello sameer,

    You can use the following code to copy pages recursively

    var pageManager = new CmsManager();
    var cmsPage = (ICmsPage)pageManager.GetPage(new Guid("BAD499EE-AEDA-4259-B5FE-B9D4192B446F"));
    string copyName = "Copyof" + cmsPage.MenuName;
    var copyOf = pageManager.DuplicatePage(cmsPage, copyName, true);
    pageManager.SavePage(copyOf);

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. sameer
    sameer avatar
    14 posts
    Registered:
    28 Apr 2009
    03 Dec 2009
    Link to this post
    thanks Ivan
    the code working GOOD :)
Register for webinar
5 posts, 0 answered