cancel
Showing results for 
Search instead for 
Did you mean: 

Document preview modification

dabada83
Champ in-the-making
Champ in-the-making
hello to everyone

I want to add one new surf page on Alfresco Share in order to use preview document feature outside a Share site (add a link on Alfresco Web-client to preview documents using Alfresco Share components). I think I can reuse document-details page and I have to change URL to access it. How do I change URL for this?

Change this
http://localhost:8080/share/page/site/m … nodeRef….

to something similar to

http://localhost:8080/share/mydocument- … nodeRef….

with regards - Diego
2 REPLIES 2

jbarmash
Champ in-the-making
Champ in-the-making
I am not sure I understand your question correctly, but it seems like you'd need to edit share\templates\document-details\document-details.js or share\WEB-INF\classes\alfresco\templates\org\alfresco\document-details.ftl or one of the included components.

dabada83
Champ in-the-making
Champ in-the-making
Thanks for your reply.

I think I should change the "document-details", but I'm not sure if I just change the templates. In line 131, share/templates/document-details/document-details.js" is the creation of URL to call the page.

var itemUrl = YAHOO.lang.substitute("site/{site}/document-details?nodeRef={nodeRef}",

I want to see the preview of a document that is not in Share, so I think we should not be necessary to have a site, but directly call webscript. Carried out some tests and confirmed that you can make previews of documents that are in web-client, but now you need a website, although the document is not in Share.

This is the first change I want to do, then I would remove some regions on document-details.ftl, but this seems easier to do because I only have to modify document-details.ftl