alfrescoalfresco-sharealfresco-enterprise

How to override a value from slingshot.properties in Alfresco?


I am using alfresco 6. I have created custom xml and a custom properties file under web-extension folder. My changes are not getting reflected. What's the correct way to do it?


Solution

  • You've to place the custom-slingshot properties file under web-extension\messages folder and you need to create & place the custom-slingshot context file to import the custom-slingshot properties file.

    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
    <beans>
      <bean id="org_alfresco_module_custom_propertyBootstrap" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
          <property name="resourceBundles">
             <list>
                <value>alfresco.web-extension.messages.customslingshot</value>
             </list>
          </property>
       </bean>   
    </beans>
    

    Save this as, custom-slingshot-application-context.xml file under web-extension folder.

    Create customslingshot.properties under web-extension\messages and override the message in customslingshot.properties file.

    Hope this helps

    Note: This is working on Alfresco 5.x and it should work with Alfresco 6.0. Please let me know,if you face any issues.