cancel
Showing results for 
Search instead for 
Did you mean: 

Extending Create Site

bguy
Champ in-the-making
Champ in-the-making
Hello everybody!

I'm trying to extend the create site information, but i'm getting some issues about that. I'm trying to add some other informations like, state, country, leaders of project…

First of all, where do i have to add the extra information (state, country, leaders…)?

Until now i'd modified the file create-site.get.html.ftl to add the extra information in the form. Now i'm confused about the model… Do i have to modify the file <alfresco>/model/siteModel.xml or extend it?

How i'll "push" the extended information in the model? I saw in the file <alfresco>/repository/sites/sites.post.json.js a line that creates uses a function to create the site (below):

var site = siteService.createSite(sitePreset, shortName, title, description, isPublic);

Now, do i need to extend this function? I'm really confused in how add this information….

I'll be glad to have some help!

Thanks in advance!
2 REPLIES 2

monikion
Champ in-the-making
Champ in-the-making
did you find your answer?
i have the same problem.
I have modified the create-site.get.html.ftl and added a new field for the new property.
I want to add a new property to WEB-INF/classes/alfresco/model/siteModel.xml but i can't see it in the Node Browser.I added a new aspect with a new property to the type st:site and i can see the aspect in Node Browser but not the property.
Here is the code from siteModel.xml:
 <type name="st:site">
         <title>Site</title>
         <parent>cm:folder</parent>        
         <properties>
            <property name="st:sitePreset">
               <title>Site Preset</title>
               <type>d:text</type>       
            </property>
            <property name="st:siteVisibility">
               <title>Site Visibility</title>
               <type>d:text</type>       
            </property>
         </properties>
         <mandatory-aspects>
            <aspect>cm:titled</aspect>
         <aspect>st:siteTest</aspect>
         </mandatory-aspects>
      </type>
………..
<aspect name="st:siteTest">
        <title>Site Container</title>         
         <properties>
            <property name="st:siteDomaine">
               <title>Domaine</title>
               <type>d:text</type>       
            </property>
         </properties>
        </aspect>
</aspects>
  
</model>

I tried to add a value to the new propery in sites.post.json.js :

var site = siteService.createSite(sitePreset, shortName, title, description, visibility);
site.properties["st:siteDomaine"] = "newDomaine";

but site.properties is undefined and site.customProperties is null…i don't know how to modify the new property and why i don't see it in the Node Browser.
It is possible what i want to do?

Thanks in advance!

alfcpd
Champ in-the-making
Champ in-the-making
I have almost exactly this problem, but I've tried referencing site.node.properties and site.getNode().properties, and these properties exist in an aspect which I've added to site.  I can see the added aspect in the alfresco node browser, but I cannot see or update the properties contained in that aspect.  I've opened a new thread: http://forums.alfresco.com/en/viewtopic.php?f=36&t=25875.  Please help!