cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved][Share] Customise DocumentList

lamba
Champ on-the-rise
Champ on-the-rise
Hello,

I created a custom folder type and I added it to Alfresco 3.2r2 with succes.
For this custom folder type, I have a specific contents to show by using a WebScript.
For Alfresco Explorer, I was able to do it by replacing browse.jsp by custombrowse.jsp in web-client-config-custom.xml as follows:

   <config evaluator="node-type" condition="csf:customFolderType">
      <navigation>
         <override from-view-id="/jsp/browse/browse.jsp" to-view-id="/jsp/browse/custombrowse.jsp" />
      </navigation>
   </config>

NB: the file custombrowse.jsp contains the call of my WS.

But for Share I do not know how could I do it?
I think that it is necessary to modify WebScript doclist.get or the file documentlist.js, is this true?

help please.


Thank you in advance.
22 REPLIES 22

lamba
Champ on-the-rise
Champ on-the-rise
any idea please  :roll:

lamba
Champ on-the-rise
Champ on-the-rise
no body for reply?!
no Alfresco engineer for help?!

raptus
Champ in-the-making
Champ in-the-making
I think you must learn more about Surf platform structure…. Share has dashlets, you must modify dashlets but a dashlet is not a webscript as you have seen in Alfresco.

Me too I don't understand at all how it works, and I'd like to know how to hard-modify dashlets (i.e. my-tasks dashlet to work outside the dashboard) and how to put this webscripts into share pages…

I am not so expert but I think this is the only way Share customization…. You have to find dashlet components (FTL & JS) and change everything you need.

Raptus

lamba
Champ on-the-rise
Champ on-the-rise
thank you raptus for this reply.

I crossed the file documentlist.js and I found that the list of the documents of a given space is filled and posted by means of the "widgets.dataSource" and "widgets.dataTable".

What I want, it is to show the doclist according to the following treatment:

If the folder have a customFolder type:
Do not use the "widgets.dataSource" and "widgets.dataTable"
But create an iframe in the doclist zone of the WS documentlist.get.html.ftl
And this iframe will call a WS which I developed.

Otherwise:
Use the "widgets.dataSource" and the "widgets.dataTable"

Further to your advice I am going to try to understand the logic of creation of pages under Share.

Any help will be welcome.

Thank you in advance.

raptus
Champ in-the-making
Champ in-the-making
It seems you have more experience than me, if you find an easy way to modify dashlets or a way to manage them like simple webscripts please write your suggestions, I always get problems (like undefined htmlid or many exceptions) if I touch them.
Sorry but as you can see I am a beginner,

Raptus

lamba
Champ on-the-rise
Champ on-the-rise
Maybe Smiley Happy

Raptus, try this
http://www.ixxus.com/blog/2009/04/dashlet-tips/

Let me know if you have any more question.

lamba
Champ on-the-rise
Champ on-the-rise
Hello,

I managed to create a method which allows me to show what I want instead of DataTable, but I need the noderef of the current node to make the test (If the folder is of type customFolder). This nodeRef is got back by the WS doclist.get.json.ftl.

My question now, how could I get back the nodeRef of the current or parent node from the file documentlist.js  :?:

N.B: in other places of the file documentlist.js the call me.doclistMetadata.parent.nodeRef; with me.doclistMetadata = oFullResponse.metadata; is used to get back this information.


Thank you for your help  :?

mikeh
Star Contributor
Star Contributor
The parent nodeRef is also at the top of the response from the doclist data webscript.

Thanks,
Mike

lamba
Champ on-the-rise
Champ on-the-rise
Thanks Mike,

Yes I know, but how could I get back this nodeRef on the documentlist.js file ?
I tried the call me.doclistMetadata.parent.nodeRef; but the doclistMetadata is always null !?