Hi,
I can see the below code in site-index.jsp..I want to have dynamic site dashboard as the default homepagepage once the user login to alfresco.
But in below code siteName is getting null so it is redirecting to alfresco home page only. kindly suggest how can I get different sites for users dynamically and set it as home page
// redirect to site or user dashboard as appropriate
String siteName = request.getParameter("site");
if (siteName == null || siteName.length() == 0)
{
// Get and forward to user's home page
SlingshotUserFactory slingshotUserFactory =
(SlingshotUserFactory) FrameworkUtil.getServiceRegistry().getUserFactory();
String userHomePage = slingshotUserFactory.getUserHomePage(context, userid);
response.sendRedirect(request.getContextPath() + userHomePage);
}
else
{
// forward to site specific dashboard page
response.sendRedirect(request.getContextPath() + "/page/site/" + URLEncoder.encode(siteName));
}
Is this feature what are you looking for?
https://docs.alfresco.com/5.1/tasks/set-homepage.html
Thanks for the link .But I want admin to set default homepage for all the users.
for Example if user1 has assigned site1 then he should be able to view site1 dashboard after login.
if user2 has assigned site2 then he shoud be able to view site2 dashboard.
Hi,
What if one user assigned to multiple site?
If user has multiple site then we can fetch any site and set it as homepage. But where to set all this that i am not getting.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.