cancel
Showing results for 
Search instead for 
Did you mean: 

making document library defaunt page of a site

alfresco_lover
Champ on-the-rise
Champ on-the-rise

Hi,

I would like to make doc library default page when enter site. Now default page is site dashbord.

I found tutorial how to remove site dashbord https://docs.alfresco.com/content-services/5.2/using/sites/#choosing-a-site-homepage. When I proceed all steps. get to site -> click settings -> click customize site. Then I would like to remove dashbord icon, But there is not that possibility.image

ussually people have one more icon (dashbord icon) in upper box. Is there a way how I can remove dashbord as a default and make document libarry as a default ?  Maybe is there a way how to do it through the code?

thanks.

4 REPLIES 4

abhinavmishra14
World-Class Innovator
World-Class Innovator

If i understand correctly, you are looking to set default page as "documentLibrary" when a user click on site you have created. Then you can do following:

1- Override the default site-preset and configure the primary page in case you are using the default collaboration site.

2- If you are creating custom preset based site, update the sitePages page property to point to documentLibrary by default.

Checkout this doc if you have to create a custom preset: https://docs.alfresco.com/content-services/6.2/develop/share-ext-points/site-presets/

Default site preset reference: https://github.com/Alfresco/share/blob/master/share/src/main/resources/alfresco/site-data/presets/pr...

This is the section you would need to update: https://github.com/Alfresco/share/blob/master/share/src/main/resources/alfresco/site-data/presets/pr...

So looks like this after update:

<pages>
         <page id="site/${siteid}/dashboard">
            <title>WhitePapers Site Dashboard</title>
            <title-id>page.whitePapers.title</title-id>
            <description>WhitePaper site's dashboard page</description>
            <description-id>page.whitePapers.description</description-id>
            <template-instance>dashboard-2-columns-wide-right</template-instance>
            <authentication>user</authentication>
            <properties>
               <sitePages>[{"pageId":"documentlibrary"}]</sitePages>
               <dashboardSitePage>true</dashboardSitePage>
            </properties>
         </page>
      </pages>

If you are looking for a way to land a user directly to a specific site doclib, checkout these :

http://formtektips.blogspot.com/2017/01/how-to-change-alfresco-share-landing.html

https://hub.alfresco.com/t5/alfresco-content-services-forum/changing-the-landing-page-after-login/td...

https://github.com/Alfresco/share/blob/master/share/src/main/webapp/site-index.jsp

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

Hi,

thanks for your answer. I tried to follow your steps. The problem occured when I tried to change presets.xml.

When I opend presets.xml file it was already modified. It looked like this.image in the tag <sitePages> was only docuemnt library, but when I look to alfresco share there was also dashboard and site members like this :image

Is there a explenation why it is not working how it should? 

Thanks.

Interesting, can you provide the steps how you updated the presets?

Hope you followed the docs :

https://docs.alfresco.com/content-services/6.2/develop/share-ext-points/site-presets/#deployment---a...

https://docs.alfresco.com/content-services/6.2/develop/share-ext-points/site-presets/#deployment-all...

<?xml version='1.0' encoding='UTF-8'?>
<presets replace="true">
   <!-- 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/colleagues</url>
            <properties>
               <height>504</height>
            </properties>
         </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>
               <dashboardSitePage>true</dashboardSitePage>
            </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>full-width-dashlet</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/dynamic-welcome</url>
            <properties>
               <dashboardType>user</dashboardType>
            </properties>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-1-1</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/my-sites</url>
         </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>user/${userid}/dashboard</source-id>
             <url>/components/dashlets/my-activities</url>
         </component>
         <component>
             <scope>page</scope>
             <region-id>component-2-2</region-id>
             <source-id>user/${userid}/dashboard</source-id>
             <url>/components/dashlets/my-documents</url>
             <properties>
                <height>240</height>
             </properties>
         </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-right</template-instance>
            <authentication>user</authentication>
         </page>
      </pages>
   </preset>
</presets>

Post this change, as soon as you click on site from list of sites, it would land you in document Library. DocumentLibrary will also be default selected if you go back

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

Hi,

basiclly I looked into presets.xml  in destination : tomcat/webapps/share/WEB-INF/classes/alfresco/site-data/presets/presets.xml .

When I opened it presets.xml it looked like this:

<?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/colleagues</url>
            <properties>
               <height>504</height>
            </properties>
         </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>
   
   <!-- 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>full-width-dashlet</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/dynamic-welcome</url>
            <properties>
               <dashboardType>user</dashboardType>
            </properties>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-1-1</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/my-sites</url>
         </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>user/${userid}/dashboard</source-id>
             <url>/components/dashlets/my-activities</url>
         </component>
         <component>
             <scope>page</scope>
             <region-id>component-2-2</region-id>
             <source-id>user/${userid}/dashboard</source-id>
             <url>/components/dashlets/my-documents</url>
             <properties>
                <height>240</height>
             </properties>
         </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-right</template-instance>
            <authentication>user</authentication>
         </page>
      </pages>
   </preset>

   <!-- Well known preset used to generate the default RM Site dashboard -->
   <preset id="rm-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/colleagues</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>Records Management Site Dashboard</title>
            <title-id>page.rmSiteDashboard.title</title-id>
            <description>Records Management site's dashboard page</description>
            <description-id>page.rmSiteDashboard.description</description-id>
            <template-instance>dashboard-2-columns-wide-right</template-instance>
            <authentication>user</authentication>
            <properties>
               <sitePages>[{"pageId":"documentlibrary"}, {"pageId":"rmsearch"}]</sitePages>
               <pageMetadata>{"documentlibrary":{"titleId":"page.rmDocumentLibrary.title", "descriptionId":"page.rmDocumentLibrary.description", "type":"dod5015"}}</pageMetadata>
            </properties>
         </page>
      </pages>
   </preset>

   <!-- Well known preset used to generate the Sharepoint protocol integration Site -->
   <preset id="document-workspace">
      <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/colleagues</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>Document Workspace Dashboard</title>
            <title-id>page.workspace.title</title-id>
            <description>Document Workspace dashboard page</description>
            <description-id>page.workspace.description</description-id>
            <template-instance>dashboard-2-columns-wide-left</template-instance>
            <authentication>user</authentication>
            <properties>
               <sitePages>[{"pageId":"documentlibrary"}, {"pageId":"links"}]</sitePages>
            </properties>
         </page>
      </pages>
   </preset>

   <!-- Well known preset used to generate the Sharepoint protocol integration meeting Site -->
   <preset id="meeting-workspace">
      <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/colleagues</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>Meeting Workspace Dashboard</title>
            <title-id>page.meeting_workspace.title</title-id>
            <description>Meeting Workspace dashboard page</description>
            <description-id>page.meeting_workspace.description</description-id>
            <template-instance>dashboard-2-columns-wide-left</template-instance>
            <authentication>user</authentication>
            <properties>
               <sitePages>[{"pageId":"documentlibrary"}, {"pageId":"calendar"}]</sitePages>
            </properties>
         </page>
      </pages>
   </preset>
</presets>

so it have been already edited to right form, but I cant see it in alfresco share. As I mentioned in previous commnets.