Get image from content/gallery

Hi, guys.

Have a question: how can I get image from content/gallery directory directly from .ftl? Which tag should I use?

you can use the tag with the path attribute
The documentation page [1] contains an example with pdf resource but should work with an image in a similar way.


Thank you for reply. But can’t get, where “documents” var is mapped from?


“document.title” - where can I see what parameters I can get from document object?

Why I got empty document.title?

Suppose you have a list of content beans as explained in [1] make sure the annotation
@Node is present on the bean class and there is a method getTitle:

public String getTitle() {
return getProperty(“myproject:title”);

If you have freemarker errors on your log, try to figure out why. If you don’t, you could place a breakpoint in the getTitle method and check if it stops there and returns a value


1 Like