cancel
Showing results for 
Search instead for 
Did you mean: 

How to reset the preset for existing sites?

patil
Champ on-the-rise
Champ on-the-rise
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
1 REPLY 1

zladuric
Champ on-the-rise
Champ on-the-rise
You can use Node browser in the Web client. I think you need the site store or something. Or ftp into that store and go down the sites and find the config files. Then you can edit stuff.

I also think you can do it via javascript, access the site config. Something like this remote webscript url:
"/s/remotestore/create/alfresco/site-data/components/page." + component + ".site~" + site + "~" + type + "?s=sitestore";   

So look into those webscripts, maybe it will give you a hint.