cancel
Showing results for 
Search instead for 
Did you mean: 

Associate an Custom View automatically

ze
Champ in-the-making
Champ in-the-making
Hi,

Its possible associate an Custom View (FreeMarker template) to a space automatically, when I create an new space?

What I want is define that all children of that space have that Custom View (FreeMarker template)…it’s that possible?

How can I do that?


Tank’s in advance for the help!
1 REPLY 1

kevinr
Star Contributor
Star Contributor
You could do this using a javascript rule. You would execute the javascript rule when a new space is created.

A template view is simply an aspect that points to the template that is responsible for rendering the custom view. The aspect is called 'cm:templatable' and the noderef property on it is called 'cm:template'. So within your javascript you simply need to add that aspect and set the noderef property to the template node for the custom view.
http://wiki.alfresco.com/wiki/JavaScript_API

Hope this helps,

Kevin