Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Tom Vleminckx
Get URL for DLFileEntry
November 4, 2011 2:44 AM
Answer

Tom Vleminckx

Rank: Junior Member

Posts: 39

Join Date: June 27, 2011

Recent Posts

Hello,

Is there an util class or method to generate the URL for a fileentry in de documentlibrary?

Thank you,
Ravi Kumar Gupta
RE: Get URL for DLFileEntry
November 4, 2011 2:52 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1137

Join Date: June 23, 2009

Recent Posts

Check view_file_entry.jsp in tomcat-6.0.29\webapps\ROOT\html\portlet\document_library directory. It has fileUrl variable. See how that is formed.

HTH
Sagar A Vyas
RE: Get URL for DLFileEntry
November 4, 2011 3:33 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 655

Join Date: April 17, 2009

Recent Posts

Tom Vleminckx:
Hello,

Is there an util class or method to generate the URL for a fileentry in de documentlibrary?

Thank you,

Hi Tom,

Just do as below you will get url of particular DLFileEntry

<a href='<%=themeDisplay.getPortalURL()+"/c/document_library/get_file?uuid="+dlFileEntry.getUuid()+"&groupId="+themeDisplay.getScopeGroupId() %>' >
MyFile </a>

Thanks,
Sagar Vyas
Tom Vleminckx
RE: Get URL for DLFileEntry
November 4, 2011 3:36 AM
Answer

Tom Vleminckx

Rank: Junior Member

Posts: 39

Join Date: June 27, 2011

Recent Posts

Allright,

Thank you both for the quick response.

Tom
Roberto Javier
RE: Get URL for DLFileEntry
March 1, 2012 8:05 AM
Answer

Roberto Javier

Rank: New Member

Posts: 5

Join Date: March 1, 2012

Recent Posts

Excellent, thank you very much Sagar ...
Sagar A Vyas
RE: Get URL for DLFileEntry
March 1, 2012 9:14 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 655

Join Date: April 17, 2009

Recent Posts

Roberto Javier:
Excellent, thank you very much Sagar ...



Glad to know it helps you emoticon
me liferay
RE: Get URL for DLFileEntry
January 11, 2013 8:13 PM
Answer

me liferay

Rank: New Member

Posts: 23

Join Date: December 14, 2011

Recent Posts

Is there a way to get it in the ModelLisetener class because in that class we do not have themdisplay object reference.
all I have id dlfileEntry reference.