Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Prefix for accessing embedded pictures in HTML templates #76

Closed
gorbunkov opened this issue Mar 29, 2021 · 4 comments
Closed

Prefix for accessing embedded pictures in HTML templates #76

gorbunkov opened this issue Mar 29, 2021 · 4 comments
Assignees
Milestone

Comments

@gorbunkov
Copy link
Contributor

gorbunkov commented Mar 29, 2021

From CUBA documentation:

You can use the core:// and web:// prefixes to reference to image resources from the web or core module without having to hard-code webPort and webContextName in the template. For example, the image hosted in the deploy\tomcat\webapps\app\VAADIN\images folder can be inserted like:

In Jmix we should use another prefix for that (web:// and core:// don't make sense any more).
Current prefix names should remain for backward compatibility?

@gorbunkov gorbunkov added this to the 1.0.0 milestone Mar 29, 2021
@gorbunkov gorbunkov self-assigned this Mar 29, 2021
@gorbunkov gorbunkov assigned m-orlova and unassigned gorbunkov May 26, 2021
m-orlova pushed a commit that referenced this issue Jun 1, 2021
Replace the "web://" and "core://" prefixes by "resource://" prefix: image resource is searched by path specified after "resource://" prefix in the "conf" directory and classpath resources.
@m-orlova
Copy link

m-orlova commented Jun 1, 2021

New prefix (resource://) that replaces "web://" and "core://" prefixes is introduced. The resource is searched by a path specified after the "resource://" prefix in the "conf" directory and classpath resources. This logic works only for HTML templates that have PDF as an output type.

@m-orlova m-orlova closed this as completed Jun 1, 2021
@BryanYin
Copy link

BryanYin commented Jun 5, 2021

Hi @m-orlova , I tested this, it's not working in Groovy html templates, could you please confirm?
image

@m-orlova
Copy link

m-orlova commented Jun 7, 2021

Hi @BryanYin,
The "resource://" prefix is processed in the case of the template body is HTML but the output type is PDF. In your case the output type is HTML so this case is not related to changes made in this issue.

@BryanYin
Copy link

BryanYin commented Jun 7, 2021

Hi @m-orlova,
Thanks for the confirmation, I will add this to the doc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants