cancel
Showing results for 
Search instead for 
Did you mean: 

Several links to the repository (header share)

ajv
Champ in-the-making
Champ in-the-making
Hi all,

I want to customize the main header bar in the Share application via the share-config-custom.xml mechanism.

I need two repository items:
Repository 1 with root-node in company home.
Repository 2 with root-node in user-home.


Is there any option to do so without developing a new page (using the same repository.xml)??
Thanks in advance!
3 REPLIES 3

mikeh
Star Contributor
Star Contributor
Is there any option to do so without developing a new page (using the same repository.xml)?
No sorry; there's currently only one "root-node" config value in share-config.

Thanks,
Mike

vishnuvasudev
Champ in-the-making
Champ in-the-making
Hi,

I am configuring share repository link to user home. But now i want to connect to datalist of sites through repository. What i can do? Please help me..

Thanks and Regards,
Vishnu.

erikwinlof
Confirmed Champ
Confirmed Champ
(@Vishnu Please create a new thread for your question since it doesn't seem to be related to what Ajv was asking about.)

Hi Ajv,

As Mike says there is no config support for this. If you however want to take your chances you might be able to get something working using the following approach. Note that this approach is untested.

In a 4.0 server:
Create a new "userlibrary" page and create a link to it in the header.
Create an extension module that is only activated when for certain page names, in this case only the name of your new page.
The extension module would then "customize" the document library components's javascript controllers and set the "model.rootNode" to the user's home (instead of the value that is picked form the <root-node> element).

So something like this:

/alfresco/site-data/extensions/acme-extension.xml
<extension>
   <modules>
      <module>
         <id>Acme :: User home</id>
         <auto-deploy>true</auto-deploy>
         <evaluator type="com.acme.userhome.evaluator.AcmePageModuleEvaluator">
            <params>
               <page>userlibrary</page>
            </params>
         </evaluator>
         <!– Apply the following webscript customizations when the base evaluator above passes –>
         <customizations>
            <customization>
               <targetPackageRoot>org.alfresco</targetPackageRoot>
               <sourcePackageRoot>acme.userhome.customizations</sourcePackageRoot>
            </customization>
         </customizations>
      </module>
   </modules>
<extension>

/alfresco/site-webscripts/acme/userhome/customizations/components/documentlibrary/repo-tree.get.js
var userRootNode = // todo: code that finds out the root node
model.rootNode = userRootNode; // Change the freemarker model so this root node will be used by the client side javascript components

Then repeat the process for all document library webscripts that use the config, i.e. toolbar.get.

Take a look at the following blog post on how to create an extension module and how to "customize" webscript javascript controllers.
http://blogs.alfresco.com/wp/ddraper/2011/08/26/extensibility-module-deployment/
http://blogs.alfresco.com/wp/ddraper/2011/08/05/customizing-alfresco-share-javascript-controllers/

I hope I understood your requirements correct.

Cheers, Erik