Tuesday, March 09, 2010
 
   
 
O-DL: how to create layout templates   Minimize
Location: BlogsOpenDNN blogOpen-DocumentLibrary    
Posted by: Xepient Solutions 6/25/2009
Open-DocumentLibrary comes with three different layout templates. You can also create your own.

A layout template determines how the elements of the document grid are arranged and presented to the user.

Open-DocumentLibrary includes three different layout templates that you can choose from (soon it will include a new thumbnail template, that will allow for previsualization of images as thumbnails). If you need to create your own layout, the following instructions will help you:

if you look in the installation directory of Open-DocumentLibrary:

DNNRoot/DesktopModules/XSDocumentLibrary, you will find the following files:

XSGridDocument.ascx
XSGridDocumentL2.ascx
XSGridDocumentL3.ascx

These represent the layout files that are currently available.  Copy one of them and rename the file to something like

XSGridDocumentL99.ascx 

Once you open the file in an html editor, you will see that the document grid is an ASP.NET datagrid.  You can change all the disposition of the elements within the Datagrid, as long as you do not remove them. You can add tables around them etc...

Note: The is one notable restriction.  The template column with header="DocumentEdit", always needs to be the very first column.  All others are movable.


Once you are done creating your new layout, you will then need to register your new layout so that it appears in the settings dropdown.  Look for the following file in the same directory:

XSGridDocumentLayout.xml

and copying one of the existing lines, add a line that has your new controls diplayName and name (path).

That's it.  In order to see your layout applied, just go to the module settings and select your new layout from the layout dropdown.

 

Permalink |  Trackback

Your name:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 
     
Search the Blog   Minimize
     
Blog List   Minimize
     
Blog Archive   Minimize