Site dashboard is not getting set as default home page

cancel
Showing results for 
Search instead for 
Did you mean: 
Isha
Member II

Site dashboard is not getting set as default home page

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));
}

4 Replies
angelborroy
Alfresco Employee

Re: Site dashboard is not getting set as default home page

Is this feature what are you looking for?

https://docs.alfresco.com/5.1/tasks/set-homepage.html

Hyland Developer Evangelist
Isha
Member II

Re: Site dashboard is not getting set as default home page

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.

 

sanjaybandhniya
Intermediate

Re: Site dashboard is not getting set as default home page

Hi,

What if one user assigned  to multiple site?

Isha
Member II

Re: Site dashboard is not getting set as default home page

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.