Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Customize Document & Media Library
Hi all,
I am trying to modify document & media Library portlet's functionality. Here is what all I am trying to acheive :
I want to create separate root folders for different Document & Media Portlet. Is it possible to acheive ??
I did this -
dl.store.file.system.root.dir=${liferay.home}/data/document_library/my_folder
But it changes root for all portlets..Has anyone did this ??
Also is liferay sync of my use ?? Does it provide additional features to Liferay's CMS
Thanks in advance.
I am trying to modify document & media Library portlet's functionality. Here is what all I am trying to acheive :
I want to create separate root folders for different Document & Media Portlet. Is it possible to acheive ??
I did this -
dl.store.file.system.root.dir=${liferay.home}/data/document_library/my_folder
But it changes root for all portlets..Has anyone did this ??
Also is liferay sync of my use ?? Does it provide additional features to Liferay's CMS
Thanks in advance.
Hi Prateeksha,
what you're trying to use is the path in the file system
If you want to have different root folders to show in different appearance of the Document and Media portlet, it's not possible. That portlet data for a group (site) and shows the exactly same data in each of its appearance on each of the page of a group.
You can use the Document and Media Display for something like this.
Regards,
Zsigmond
what you're trying to use is the path in the file system
If you want to have different root folders to show in different appearance of the Document and Media portlet, it's not possible. That portlet data for a group (site) and shows the exactly same data in each of its appearance on each of the page of a group.
You can use the Document and Media Display for something like this.
Regards,
Zsigmond
Thanks for your reply Zsigmond ,
What you described is normal behaviour for document and media portlet, can it be customized as per my requirement ???
i.e.,, if I have 2 such portlets on two different pages/sites, can they be connected to two folders at different locations? By hook or ext ??
What you described is normal behaviour for document and media portlet, can it be customized as per my requirement ???
i.e.,, if I have 2 such portlets on two different pages/sites, can they be connected to two folders at different locations? By hook or ext ??
Hi Prateeksha,
unfortunately, there isn't a function like this. The data is always connecting to a group as a page set also. If you put the Document and Media portlet to multiple page set in a group, the portlet will show the same data in all of the portlets.
Do you want to separate the data completely, or only show different folders from the same structure?
Both is possible with customization, however, I think, the latter one is easier.
For the first one you need to implement some logic which can have multiple separated document structure in a group.
For the second you can implement the same logic which is in the Document and Media Display portlet.
Regards,
Zsigmond
unfortunately, there isn't a function like this. The data is always connecting to a group as a page set also. If you put the Document and Media portlet to multiple page set in a group, the portlet will show the same data in all of the portlets.
Do you want to separate the data completely, or only show different folders from the same structure?
Both is possible with customization, however, I think, the latter one is easier.
For the first one you need to implement some logic which can have multiple separated document structure in a group.
For the second you can implement the same logic which is in the Document and Media Display portlet.
Regards,
Zsigmond
hey Zsigmond,
I want to separate the data completely . So do I have to hook and which file I have to override. Do you have any idea ??
Also, I want to change my Files storage path as :
"dl.store.file.system.root.dir=D:/NewFolder/document_library/data"
but it gives
D:\NewFolder/document_library/data\10154\13514\701\1.0 (The system cannot find the path specified) error
what I can do to acheive this ???
I want to separate the data completely . So do I have to hook and which file I have to override. Do you have any idea ??
Also, I want to change my Files storage path as :
"dl.store.file.system.root.dir=D:/NewFolder/document_library/data"
but it gives
D:\NewFolder/document_library/data\10154\13514\701\1.0 (The system cannot find the path specified) error
what I can do to acheive this ???
Hi Prateeksha,
one other thing came into my mind. Is it fine if the data is connected to pages? If you put a Document and Media portlet to a page, you can set that page as a scope for that portlet and all of the documents which will be created through that page will have the page as a scope. So that document structure will be independent from others.
The disadvantage is that you can see those documents only on that page.
if that is not fine for you, you have to redesign the logic. You have to find out something to save the documents to beside the groups and modify the logic on all of the levels. You could introduce some new property for documents and folders like the portal use the scopeGroupId.
Unfortunately it's not that easy question to answer. It needs new design.
Regards,
Zsigmond
one other thing came into my mind. Is it fine if the data is connected to pages? If you put a Document and Media portlet to a page, you can set that page as a scope for that portlet and all of the documents which will be created through that page will have the page as a scope. So that document structure will be independent from others.
The disadvantage is that you can see those documents only on that page.
if that is not fine for you, you have to redesign the logic. You have to find out something to save the documents to beside the groups and modify the logic on all of the levels. You could introduce some new property for documents and folders like the portal use the scopeGroupId.
Unfortunately it's not that easy question to answer. It needs new design.
Regards,
Zsigmond