cancel
Showing results for 
Search instead for 
Did you mean: 

Adding new layout pages to 'Customize Dashboard'

tstephens
Champ in-the-making
Champ in-the-making
I have two questions.

1. I'd like to add a custom layout to the layout pages.  (Customize Dashboard > Change Layout > New Custom Layout Page).
2. I'd like the custom layout to have a stacked grid.

Right now there are 4 pages shown by default.

I'd like to have a new custom layout that has a stacked grid.   I don't see where  I can add the pages; and then looking at existing templates I don't see how to show a stacked grid. (it looks to be one giant grid).

———-    ——————————————————–
|         |    |                                                     |
|         |    |                                                     |
|         |    |                                                     |
———-    ——————————————————–
———————————————————————-
|                                                                    |
|                                                                    |
|                                                                    |
———————————————————————-

Any ideas on these two questions?
2 REPLIES 2

ddraper
World-Class Innovator
World-Class Innovator
Firstly… what version of Alfresco are you coding against?

The layouts you can select from are defined in the "/components/dashboard/customise-layout" WebScript (in HEAD they are defined in the JS controller, in previous versions they are defined in the FreeMarker template). The layouts all specify a templateId attribute which maps to a Surf "template-instance". However, you are right that they all define a big grid. This is done because each dashlet is a Component and gets bound to a Region and each "cell" in the grid defined by the template is rendered as a region.

Each dashboard is actually rendered by the org/alfresco/dashboard template (defined by the "dashboard.ftl" and "dashboard.js" files which uses the "gridClass" and "gridColumnX" properties to render the grid. "The gridClass " property relates YUI classes that provide CSS layout controls (see http://developer.yahoo.com/yui/grids/).

You should just be able to define your own template instance and set it as a new "templateId" in the customize-layout WebScript (if you're using HEAD then you'll be able to extend the controller directly, if you're using anything else then you'll have to copy/paste the WebScript to the "web-extension" path. However, you should bear in mind that you'll need to also setup the customize dashlets WebScript to allow you use the new layout and that you'll need to ensure that your layout renders regions that dashlets can be bound into.

I hope that helps!

Regards,
Dave

mrca_506
Champ in-the-making
Champ in-the-making
Hello, I am trying to do do a custom layout for the Dashboard as the case described above. I have followed your instructions by ddraper, and so far I can see my layout in the customize-dashboard options but when I try to apply it, Alfresco displays this:
"
This is an unconfigured page.
User Dashboard
Please check the page configuration.
"

What can I be missing? Any hints would be appreciated.