掲示板

Documents and Media Portlet View Button

7年前 に Ryan Smith によって更新されました。

Documents and Media Portlet View Button

New Member 投稿: 8 参加年月日: 16/07/28 最新の投稿
When the view button on the Documents and Media Portlet is clicked it will just reload the page. Is there a way to prevent this and have it actually open the document?
I was originally thinking of using javascript to grab the url from the input field value and replacing the view button's href with the value, but I can't seem to access the DOM element of the input field. (Even if this worked, I'd have to check to see if it was an image, pdf, or doc/docx file because doc/docx files instantly download, which is not what I want).

I must be overthinking this, is there an easier way to get the view button to open a new tab that has the document displayed?

添付ファイル:

thumbnail
7年前 に Samuel Kong によって更新されました。

RE: Documents and Media Portlet View Button

Liferay Legend 投稿: 1902 参加年月日: 08/03/10 最新の投稿
Ryan Smith:
When the view button on the Documents and Media Portlet is clicked it will just reload the page.


It's not reloading the page. The information for the older version of the file is loaded. Try adding additional versions of the file and you'll probably get a better idea of what's going on.

Is there a way to prevent this and have it actually open the document?

If you want to open the document, use the 'Download' button (located left of the View button).
7年前 に Ryan Smith によって更新されました。

RE: Documents and Media Portlet View Button

New Member 投稿: 8 参加年月日: 16/07/28 最新の投稿
Samuel Kong:

If you want to open the document, use the 'Download' button (located left of the View button).


That seems a little misleading, because I don't want my users to download the documents, but be able to view them outside the previewer. For example if it's a word document, it should be viewable online instead of it instantly attempting to download the document.
There seems to be issues with the previewer when the documents are pdfs as well. Sometimes the preview displays the document incorrectly.

There should be a way to view all documents online without the need to download. Could you tell me if there is a way to do this?
thumbnail
7年前 に Samuel Kong によって更新されました。

RE: Documents and Media Portlet View Button

Liferay Legend 投稿: 1902 参加年月日: 08/03/10 最新の投稿
If you just want a preview of the document, than the page in your screenshot will already show a preview of the document.

On the other hand, if you want Microsoft Word to open the document from within the browser, than that's outside the scope of Liferay. This is something that needs to be configured in the browser and is not something you can change from the portal.
7年前 に Ryan Smith によって更新されました。

RE: Documents and Media Portlet View Button

New Member 投稿: 8 参加年月日: 16/07/28 最新の投稿
Ryan Smith:

There seems to be issues with the previewer when the documents are pdfs as well. Sometimes the preview displays the document incorrectly.


The previewer doesn't always work. It often times displays incorrectly. This is why there should be a way to access another way to view a document without the need to download. The application of word is not required to view word documents, there are ways to read doc/docx or other text files online.
thumbnail
7年前 に Samuel Kong によって更新されました。

RE: Documents and Media Portlet View Button (回答)

Liferay Legend 投稿: 1902 参加年月日: 08/03/10 最新の投稿
What have you configured to generate to the preview. Liferay provides several options and you can also plug in a custom previewer if you want. See 'dl.file.entry.processors' in portal.properties for more info.