In this tutorial you will see how to make a page the default landing page.
Alfresco Surf supports the notion of a default page which is defined in the configuration for the entire web site. By default the landing page is site-index.jsp, which redirects to the authenticated user's dashboard page. The site default landing page will be rendered when a request is mapped to the Spring MVC RequestDispatcher (which by default is at /page and /p) but no page is included in the request, for example, /share/page. This is also configured as the welcome-file in the Share web.xml file.
In order to change the landing page for the application you can override the default site configuration for Alfresco Share. The site configuration used is defined in surf.xml and is set to slingshot.site.configuration by default.
- Create a new folder called web-extension in config/alfresco.
- Create another new folder called site-data in config/alfresco/web-extension.
- Create another new folder called configurations in config/alfresco/web-extension/site-data
In the folder
create a file called slingshot.site.configuration.xml, with
the following contents:
<configuration> <source-id>site</source-id> <properties> <root-page>home-page</root-page> </properties> </configuration>Attention: Note that the file is located on the web-extension path so that it is resolved before the Alfresco Share default.
- Run the project build script to build the project.
- Restart the application server.
Load the page http://localhost:8080/share.
After logging in your new landing page will be displayed.