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

Forums / Developing with Sitefinity / Duplicate page and all child pages

Duplicate page and all child pages

4 posts, 0 answered
  1. Jason M
    Jason M avatar
    108 posts
    Registered:
    15 Jan 2007
    08 Feb 2008
    Link to this post
    Is there a way to duplicate a page and all child pages in Sitefinity?  In the Site Map page you have the option to Duplicate page, but this only duplicates the page and not the child pages.  I realize this probably isn't possible with the Sitefinity admin site.  Do you have a SQL script I could run to do this?  I'm using Sitefinity 3.1 with SQL2000 (soon to be 2005) db.
     
    We currently have approximately 40 event sites and need to create about 10 new per year.  So this would save us heaps of time deploying our new site and new events.
     
    Thanks in advance for your help!
    J
  2. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    11 Feb 2008
    Link to this post
    Hello Jason,

    Your are right, this is not possible through the Sitefinity user interface. Also, it's not possible to provide an universal SQL script for this task, since it should be quite specific.
    Sitefinity 3.2 will be shipped with an Export tool, which will let the user export the site as a site template. The template can be used in the Project Manager to create a new site with almost the same database, files and configuration. Most probably, further we will extend this tool to provide almost the same functionality as duplicating
    page with sub-pages with exporting and importing in the same site.

    Sincerely yours,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Jason M
    Jason M avatar
    108 posts
    Registered:
    15 Jan 2007
    11 Feb 2008
    Link to this post
    Thanks for the reply Vlad!
     
    In our case we have a specific set of pages we'd copy each time to a new directory.  If a new page was added to the template, I would be fine with updating the SQL script accordingly.  Which stored procedure(s) are used to duplicate pages?  Maybe this would be a good starting point for me to create my script.
     
    Below is my sample TEMPLATE directory:
     
    Home.aspx
        Networks.aspx
            TEMPLATE.aspx
                page1.aspx
                page2.aspx
     
    It would look like this after the script is run:
     
    Home.aspx
        Networks.aspx
            TEMPLATE.aspx
                page1.aspx
                page2.aspx
            TEMPLATE_copy.aspx
                page1.aspx
                page2.aspx
     
    If this isn't possible, no worries.  This functionality would be extremely helpful for sites such as ours.
     
    I'm eagerly awaiting 3.2 :-)
    J
  4. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    11 Feb 2008
    Link to this post
    Hi Jason M,

    We are using an ORM (Object-relationl mapping) for database access layer, which gives us an advantage to implement all logic for CRUD operations in the code, no matter what the database is. All database objects are created automatically based on the generated by ORM classes and we don't take care of the exact database structure (tables, stored procedures, functions, etc.). Therefore, we cannot provide the required script and ensure you that it will work as expected.


    All the best,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
4 posts, 0 answered