cancel
Showing results for 
Search instead for 
Did you mean: 

How can i change default dashlets

itsjjonnet
Champ in-the-making
Champ in-the-making
Hi All,

I want to know how can i change the default dashlet i.e. getting started dashlet to some other dashlet once user logs in.
6 REPLIES 6

dynamolalit
Champ on-the-rise
Champ on-the-rise
Hi,

You can achieve this by changing

<default-dashlets>
<dashlet id="getting-started" />
<dashlet id="tasks-todo" />
</default-dashlets>

tag in web-client-config.xml file under ..\WEB-INF\classes\alfresco.

Here you can place your desired list of dashlets which user will see once he logs in.

Also it's better if you override it in web-client-config-custom.xml file.

ahamed_rasmi
Champ in-the-making
Champ in-the-making
Hi,

I could change that as you mentioned.. thats working..

But there is a new requirement. We need default dashboard layout as "Two Column Narrow Right"..

I changed  following as default..

  <layout id="default" columns="2" column-length="4" image="/images/icons/layout_narrow_right_2column.gif"
      label-id="layout_narrow_right_label" description-id="layout_narrow_right_desc"
    jsp="/jsp/dashboards/layouts/narrow-right-2column.jsp" />

Now i get 2 columns..

But there is no option in web-client-config.xml to to give row column values in defalut-dashlets tag (in Alfresco share, presets.xml  has that)

<default-dashlets>
    <dashlet id="doclist-webscript" />
     <dashlet id="myspaces-webscript" />
    <dashlet id="tasks-todo" />
     <dashlet id="opensearch"/>       
</default-dashlets>

I need 2 first two dashlets in first column and next two in second column..

Kindly advise me any option available..

Thanks,
Ahamed

jeshurun
Champ in-the-making
Champ in-the-making
I have a similar requirement. Has someone found a solution for this?

ahamed_rasmi
Champ in-the-making
Champ in-the-making
Is there anyone to help us?

-Ahamed

ahamed_rasmi
Champ in-the-making
Champ in-the-making
Step1:

Create a new folder "extension" in following path

C:\Alfresco\tomcat\webapps\alfresco\jsp\dashboards\layouts\extension {You are free to choose to this path. Any path after context root \alfresco\ will do. web-client-config.xml should reflect your path}

Step2:

Create a new file "yourdashboard.jsp" in the folder created in Step1

Step3:



C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\web-client-config.xml

Change the following code

<layout id="default" columns="1" column-length="5" image="/images/icons/layout_single_column.gif"
  label-id="layout_single_label" description-id="layout_single_desc"       jsp="/jsp/dashboards/layouts/single-column.jsp" />


as

<layout id="default" columns="1" column-length="5" image="/images/icons/layout_single_column.gif"
label-id="layout_single_label" description-id="layout_single_desc"
                  jsp="/jsp/dashboards/layouts/extension/yourdashboard.jsp" />

and


edit the default dashlets tag (Maximum 5)
as
 <default-dashlets>
     <dashlet id="myspaces-webscript"/>
     <dashlet id="opensearch"  />
      <dashlet id="tasks-todo"/>
</default-dashlets>

Step4:

Add following code in the following code..

<%–
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
–%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>

<%@ page import="org.alfresco.web.app.Application" %>

<h:panelGrid columns="2" cellpadding="2" cellspacing="2" width="100%" columnClasses="tableNarrowWidth,tableWideWidth">
<% Application.getDashboardManager().initDashboard(); %>
<h:panelGroup>
<a:panel label="#{DashboardManager.dashletTitle[0]}" id="dashlet-0" rendered="#{DashboardManager.dashletAvailable[0]}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" style="padding:4px">
<f:subview id="dashlet-1-view">
<jsp:include page="<%=Application.getDashboardManager().getDashletPage(0)%>" />
</f:subview>
</a:panel>
<f:verbatim><div style='padding:4px'></div></f:verbatim>
<a:panel label="#{DashboardManager.dashletTitle[3]}" id="dashlet-1" rendered="#{DashboardManager.dashletAvailable[3]}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" style="padding:4px">
<f:subview id="dashlet-2-view">
<jsp:include page="<%=Application.getDashboardManager().getDashletPage(3)%>" />
</f:subview>
</a:panel>
<f:verbatim><div style='padding:4px'></div></f:verbatim>
<a:panel label="#{DashboardManager.dashletTitle[4]}" id="dashlet-2" rendered="#{DashboardManager.dashletAvailable[4]}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white">
<f:subview id="dashlet-3-view">
<jsp:include page="<%=Application.getDashboardManager().getDashletPage(4)%>" />
</f:subview>
</a:panel>
<f:verbatim><div style='padding:4px'></div></f:verbatim>
<a:panel label="#{DashboardManager.dashletTitle[5]}" id="dashlet-3" rendered="#{DashboardManager.dashletAvailable[5]}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white">
<f:subview id="dashlet-4-view">
<jsp:include page="<%=Application.getDashboardManager().getDashletPage(5)%>" />
</f:subview>
</a:panel>
</h:panelGroup>
<h:panelGroup>
<a:panel label="#{DashboardManager.dashletTitle[1]}" id="dashlet-4" rendered="#{DashboardManager.dashletAvailable[1]}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white">
<f:subview id="dashlet-5-view">
<jsp:include page="<%=Application.getDashboardManager().getDashletPage(1)%>" />
</f:subview>
</a:panel>
<f:verbatim><div style='padding:4px'></div></f:verbatim>
<a:panel label="#{DashboardManager.dashletTitle[2]}" id="dashlet-5" rendered="#{DashboardManager.dashletAvailable[2]}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white">
<f:subview id="dashlet-6-view">
<jsp:include page="<%=Application.getDashboardManager().getDashletPage(2)%>" />
</f:subview>
</a:panel>
<f:verbatim><div style='padding:4px'></div></f:verbatim>
<a:panel label="#{DashboardManager.dashletTitle[6]}" id="dashlet-6" rendered="#{DashboardManager.dashletAvailable[6]}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white">
<f:subview id="dashlet-7-view">
<jsp:include page="<%=Application.getDashboardManager().getDashletPage(6)%>" />
</f:subview>
</a:panel>
<f:verbatim><div style='padding:4px'></div></f:verbatim>
<a:panel label="#{DashboardManager.dashletTitle[7]}" id="dashlet-7" rendered="#{DashboardManager.dashletAvailable[7]}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white">
<f:subview id="dashlet-8-view">
<jsp:include page="<%=Application.getDashboardManager().getDashletPage(7)%>" />
</f:subview>
</a:panel>
</h:panelGroup>
</h:panelGrid>

I was able to put my own dashboard

gman
Champ in-the-making
Champ in-the-making
Using this method, would one be able to build a default dashboard that has two columns of equal width?