AnsweredAssumed Answered

How to reset the preset for existing sites?

Question asked by patil on Oct 10, 2011
Latest reply on Oct 11, 2011 by zladuric
I have sites with the dafault preset in my production server.

Now I need to remove some of the dashlets for the existing sites. I have changed the presets.xml for my new configuration.


<?xml version='1.0' encoding='UTF-8'?>
<presets>
   <!– Well known preset used to generate the default Collaboration Site dashboard –>
   <preset id="site-dashboard">
      <components>
         <!– title –>
         <component>
            <scope>page</scope>
            <region-id>title</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/title/collaboration-title</url>
         </component>
         <!– navigation –>
         <component>
            <scope>page</scope>
            <region-id>navigation</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/navigation/collaboration-navigation</url>
         </component>
         <!– dashboard components –>
     
         <component>
            <scope>page</scope>
            <region-id>component-1-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/docsummary</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-1-2</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/activityfeed</url>
         </component>
      
         <component>
            <scope>page</scope>
            <region-id>component-2-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/colleagues</url>
         </component>
        
      </components>
      <pages>
         <page id="site/${siteid}/dashboard">
            <title>Collaboration Site Dashboard</title>
            <title-id>page.siteDashboard.title</title-id>
            <description>Collaboration site's dashboard page</description>
            <description-id>page.siteDashboard.description</description-id>
            <template-instance>dashboard-2-columns-wide-left</template-instance>
            <authentication>user</authentication>
            <properties>
               <sitePages>[ {"pageId":"documentlibrary"}]</sitePages>
            </properties>
         </page>
      </pages>
   </preset>
  
      <!– Well known preset used to generate the default User dashboard –>
   <preset id="user-dashboard">
      <components>
         <!– title –>
         <component>
            <scope>page</scope>
            <region-id>title</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/title/user-dashboard-title</url>
         </component>
         <!– dashboard components –>
         <component>
            <scope>page</scope>
            <region-id>component-1-1</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/my-documents</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-1-2</region-id>
            <source-id>user/${userid}/dashboard</source-id>
             <url>/components/dashlets/my-docs-editing</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-1</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/my-sites</url>          
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-2</region-id>
            <source-id>user/${userid}/dashboard</source-id>
              <url>/components/dashlets/my-activities</url>         
         </component>
         <component>
             <scope>page</scope>
             <region-id>component-2-3</region-id>
             <source-id>user/${userid}/dashboard</source-id>
             <url>/components/dashlets/my-tasks</url>          
          </component>
       </components>
      <pages>
         <page id="user/${userid}/dashboard">
            <title>User Dashboard</title>
            <title-id>page.userDashboard.title</title-id>
            <description>Users dashboard page</description>
            <description-id>page.userDashboard.description</description-id>
            <template-instance>dashboard-2-columns-wide-left</template-instance>
            <authentication>user</authentication>
         </page>
      </pages>
   </preset>
  
  

</presets>


The new preset is working fine for the new sites. But it is not getting applied for the sites created with the default preset.
How should I fix this?
Is there any java api directly to do this?

Thanks,
Patil

Outcomes