cancel
Showing results for 
Search instead for 
Did you mean: 

How to change default site dashboard?

johncage
Champ in-the-making
Champ in-the-making
Hello,

I wanted to change default site dashboard by modifying of the presets.xml in share.war
and more specifically in share.war\WEB-INF\classes\alfresco\site-data\presets\presets.xml

I wanted to change site-dashboard so it contains "my tasks":

<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>full-width-dashlet</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/dynamic-welcome</url>
            <properties>
               <dashboardType>site</dashboardType>
            </properties>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-1-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/colleagues</url>
            <properties>
               <height>504</height>
            </properties>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-1-2</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/my-tasks</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/docsummary</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-2</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/activityfeed</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-right</template-instance>
            <authentication>user</authentication>
            <properties>
               <sitePages>[{"pageId":"documentlibrary"}]</sitePages>
            </properties>
         </page>
      </pages>
   </preset>


I basically added the following code:

         <component>
            <scope>page</scope>
            <region-id>component-1-2</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/my-tasks</url>
         </component>


But the "My tasks" were not added to a newly created site by default. (also I made my tasks dashlet to be a
<family>dashlet</family>
so it can appear on site's dashboard).

What I did wrong?

Thanks
John
1 REPLY 1

sujaypillai
Confirmed Champ
Confirmed Champ
Try changing the family to -
<strong><family>site-dashlet</family></strong>
in tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\dashlets\my-tasks.get.desc.xml

Once the changes are done restart server and then navigate to particular site and click on "Customize Dashboard". You should see the "My Tasks" dashlet listed under Add Dashlets section.

Add it to your required column to see the changes.