tags:

views:

106

answers:

1

I've created a plugin doing some crud operations. In the web-app/images/icons folder I've got some icons representing various operations.

The following works great when running the plugin, but as soon as the plugin is installed in an application it stops working. It does not look like images from plugins are made available in the applications they're used in.

<img alt="Ny" src="${createLinkTo(dir:'images/icons', file:'add.png')}" />

There must be a way of referring to images bundled within plugins that works both when running as plugin and application?

+1  A: 

See pluginContextPath in section Understanding a Plugins Structure in the Grails docs.

<img alt="Ny" src='${createLinkTo(dir:"${pluginContextPath}/images/icons", file:"add.png")}' />
John Wagenleitner