02-06-2018 09:44 AM
Hi,
after the login step i would like to have my dasboard site as welcome page
http://localhost:8080/share/page/site/documed/dashboard
So i try to use slingshot.site.configuration.xml file (Making the new page the default | Alfresco Documentation)
without succes :
Thank's in advance
02-06-2018 10:21 PM
Was having similar issue, resolved it by modifying the site-index.jsp, below is code for same.bold letter contains the name of site
<%@ page import="org.alfresco.web.site.*" %>
<%@ page import="org.springframework.extensions.surf.*" %>
<%@ page import="org.springframework.extensions.surf.site.*" %>
<%@ page import="org.springframework.extensions.surf.util.*" %>
<%@ page import="java.util.*" %>
<%
// retrieve user name from the session
String userid = (String)session.getAttribute(SlingshotUserFactory.SESSION_ATTRIBUTE_KEY_USER_ID);
// test user dashboard page exists?
RequestContext context = (RequestContext)request.getAttribute(RequestContext.ATTR_REQUEST_CONTEXT);
if (!context.getObjectService().hasPage("user/" + userid + "/dashboard"))
{
// no user dashboard page found! create initial dashboard for this user...
Map<String, String> tokens = new HashMap<String, String>();
tokens.put("userid", userid);
FrameworkUtil.getServiceRegistry().getPresetsManager().constructPreset("user-dashboard", tokens);
}
// redirect to site or user dashboard as appropriate
String siteName = request.getParameter("site");
if (siteName == null || siteName.length() == 0)
{
// forward to user specific dashboard page
response.sendRedirect(request.getContextPath() + "/page/site/{NAME OF SITE}/dashboard");
}
else
{
// forward to site specific dashboard page
response.sendRedirect(request.getContextPath() + "/page/site/" + URLEncoder.encode(siteName) + "/dashboard");
}
%>
02-07-2018 12:33 AM
Great ! I run an embedded Tomcat on sdk 3 architecture. Where can i place this code ?
02-07-2018 12:54 AM
I think \src\main\resources\META-INF\resources
02-07-2018 02:53 AM
Ok, so i have created site-index.jsp file with your code in \src\main\resources\META-INF\resources and i have deleted slingshot.site.configuration.xml file but it doesn't work.
i try to move site-index.jsp in \src\main\resources\META-INF\resources\project-share-jar without succes...
I have made new test by adding a new slingshot.site.configuration.xml in site-data\configurations :
<configuration>
<source-id>site</source-id>
<properties>
<root-page>site-index</root-page>
</properties>
</configuration>
but it still doesn't work
Explore our Alfresco products with the links below. Use labels to filter content by product module.