Search code examples
alfresco

How to customize create site form in Alfresco


I am new to alfresco. I am using Alfresco 6.0 I am trying to change the description of Private in the visibility section of create site form. How can I achieve this?

enter image description here


Solution

  • The clean way is to override the webscripts-resources bean to add your own properties bundle. You do that by editing the share application context file that is in your source project. In my example, it is in alfresco-share-example-share/src/main/resources/alfresco/web-extension/alfresco-share-example-share-slingshot-application-context.xml.

    Add the following bean:

       <!-- Override WebScript Messages - add slingshot application messages -->
       <bean id="webscripts.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
          <property name="resourceBundles">
             <list>
                <value>webscripts.messages.webscripts</value>
                <value>alfresco.messages.common</value>
                <value>alfresco.messages.cmm</value>
                <value>alfresco.messages.slingshot</value>
                <value>alfresco.messages.smartfolder</value>
                <value>alfresco.web-extension.messages.slingshot</value>
             </list>
          </property>
       </bean>
    

    And then put your own properties bundle in your project and set the props you want to override. In my example, the properties file goes in:

    • alfresco-share-example-share/src/main/resources/alfresco/web-extension/messages/slingshot_en.properties
    • alfresco-share-example-share/src/main/resources/alfresco/web-extension/messages/slingshot.properties

    I'm trying that now with SDK 4.0.0 and 6.1.0 and it is not working. You might give it a try and see if it works for you.