cancel
Showing results for 
Search instead for 
Did you mean: 

Editing Default User and Site Dashboard Layout / Dashlets

bigrob
Champ in-the-making
Champ in-the-making
Hi guys, for my specific implementation it makes sense to only use the 2 column layout on both the site and user dashboards. I want to make this be the default layout and pick which dashlets i'm going to use as i'm going to create a large number of sites and users and dont want to manually go through and edit the layout for each one.

So far i've succesfully commented out sections of the presets.xml located in /tomcat/webapps/share/WEB-INF/classes/alfresco/site-data/presets such that when I create a new user only the dashlets left uncommented are shown, however the dashlets are still shown in the 3 column layout. If anyone could tell me what I'd need to edit to make this layout default and/or how to define the region-id's i'd be extremely grateful.

I've been looking for where the user's layout config is stored so I could set the dashboard up as I want it to be in the preset and then look at this user's config to get figure out how to put this in as the default in presets.xml but I can't find where they're put.

Thanks in advance,
Rob
2 REPLIES 2

bigrob
Champ in-the-making
Champ in-the-making
So my bacon and egg roll at lunch somehow provided me with the epiphany I needed to get this working, since I couldn't find one comprehensive source telling me how to do this here's how to change the default dashboard layout for a site/user:

First up I made a new site type to keep the original preset intact should I want to roll back the changes, I found this simple procedure here
The elements in the Site Type pulldown box on the Create Site page is generated by an array called in create-site.get.js (which you'll find in the share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/modules directory). The array definition looks like this:

var sitePresets = [{id: "site-dashboard", name: msg.get("title.collaborationSite")}]

The id refers to a site definition in an XML file, and title.collaborationSite refers to the title text defined in create-site.get.properties. Say you want to add a new Site Type called "Project Site". Change the definition of sitePresets to this:

var sitePresets = [{id: "site-dashboard", name: msg.get("title.collaborationSite")},{id: "project-site-dashboard", name: msg.get("title.projectSite")}];

Now edit create-site.get.properties (found in the same directory) and add a line defining the title text for the new Site Type:

title.projectSite=Project Site

Finally, you'll have to create the actual site definition. Edit presets.xml (in the share/WEB-INF/classes/alfresco/site-data/presets folder). Copy the entire definition that starts with the line "<preset id="site-dashboard"> and down to the corresponding </preset> tag, and change the id to "project-site-dashboard" (or whatever you want to call your site definition).

To pick a different default layout scroll to the bottom of the preset you added in presets.xml to where it says <template-instance>dashboard-3-columns</template-instance>, you can then change dashboard-3-columns to one of the layouts that's referenced in this directory: share/WEB-INF/classes/alfresco/site-data/template-instances.

Then simply remove the dashlets and pages you don't want and update the region-id to where you want them to be.

Hope this helps someone!

flopez
Champ in-the-making
Champ in-the-making
Hi!

Does anyone know any updates on this matter? I'm speciffically interested in updating all my share users's (site and user's) dashboards to the latest custom layout configuration, make them all go back to this new "default" view, is this possible without creating a new site? or without having to log in as every user and change the dashelts? presets only works for new, not existing layouts!

PLEASE HELP!  :idea: