Hello!
I hope someone can help me with the following. I'm trying to build a Journal-Template where the user can add a document from the Document-Library. This file is should be displayed at the bottom of the Journal-Article. I don't want to add it in the Content Area as a Link. In the best case I have the name of the file and an icon of the filetype on the left of it. The icon should look like those ones, Liferay generates when you browse the document-library. That means I have an pdf-icon for pdfs, jpg-icon etc.
I added a Document-Library Element in the Structure named library. The template is an Velocity Macro (VM). How can I get to diplay the name of the file I've chosen? I've added the following line:
#if ($library.getData() != "")
<p>library.getdata()</p>
#end
This displays the path to the document. I understand that the xml-element contains the document path, but how can I generate the Filename and Icon of it? Is it possible to get the filetype or name or something like from the document-library elemet? Has someone some kind of code which is similar to what I search?
The Journal-Article should finally look like in the attached file.
Thx for any help.
- Thorben
Please sign in to flag this as inappropriate.