cancel
Showing results for 
Search instead for 
Did you mean: 

Extend share config xml

Not applicable
Hi,
I have extended share-config.xml with another file.
I added an admin tools.

<config replace="true">
  <header>
  …
It's works.
Is there a way to extend share-config.xml without override original config?
I want only add an admin tools…

Thanks,
                     -ft
3 REPLIES 3

ddraper
World-Class Innovator
World-Class Innovator
Yes, just omit the repace="true" attribute.

See this post: https://forums.alfresco.com/en/viewtopic.php?f=48&t=43183

Regards,
Dave

Not applicable
Ok, but i don't want rewrite entire config.
I would this in my-share-config.xml:

<config>
      <header>
         <app-items>
            <item type="container" id="more2">
               <container-group id="tools2" permission="admin">
                  <item type="link" id="myid">/console/admin-console/mytool</item>
               </container-group>
            </item>
         </app-items>
   </config>

Is it possible?

castgroupteam
Champ in-the-making
Champ in-the-making
It's a bit longer than override the default "share-config-custom.xml" but on our Alfresco 4.0.e the following works:

<EXT_DIR> is, as usual, <ALF_HOME>\tomcat\shared\classes

Create your custom "mycustomshare-context.xml" and place it under <EXT_DIR>\org\springframework\extensions\surf\
(create the directory tree)

<?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="my.custom.config" class="org.springframework.extensions.config.ConfigBootstrap" init-method="register">
      <property name="configService" ref="web.config" />
      <property name="configs">
         <list>
            <value>classpath:alfresco/web-extension/my-share-config.xml</value>
         </list>
      </property>
   </bean>
</beans>

Now you can insert in your "my-share-config.xml" only what you need