Foren

Get file ID with Freemarker

thumbnail
Claudio Donaté, geändert vor 8 Jahren.

Get file ID with Freemarker

Junior Member Beiträge: 68 Beitrittsdatum: 09.04.15 Neueste Beiträge
Hello guys, I have a question.

I need to get the ID of a pdf file on a template using Freemaker. We have a portlet here that uses #{dlFileEntry.fileEntryId} to get this ID, but I need to do it inside a template.

The file is inside a folder in Documents and Media.

Can anyone help me? I reckon it is possible, but I'm a bit new to Liferay and Freemarker and don't quite know how to do it.

Any help is appreciated.

Thanks!

P.s.: We are using Liferay 6.2 GA 2 with Tomcat 7.
thumbnail
Claudio Donaté, geändert vor 8 Jahren.

RE: Get file ID with Freemarker

Junior Member Beiträge: 68 Beitrittsdatum: 09.04.15 Neueste Beiträge
Anybody?
thumbnail
Olaf Kock, geändert vor 8 Jahren.

RE: Get file ID with Freemarker

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
There are several templates - in themes, in ADT, in the CMS and elsewhere. Further, they can be in Liferay's portlets or in custom portlets.

What's the kind of template that you're implementing - where is it used?
thumbnail
Claudio Donaté, geändert vor 8 Jahren.

RE: Get file ID with Freemarker

Junior Member Beiträge: 68 Beitrittsdatum: 09.04.15 Neueste Beiträge
Sorry for the late reply. I'll try to be more specific.

What I'm trying to do is get the file ID using Freemarker inside the Template that you have to link to a Structure inside Liferay.

I don't know the exact term, but I would think it is the CMS one.

Thanks!