Docs »

Plugins »

Resources

Plugins can add new sharable resources like:

  • Images

  • Scripts (Javascript)

  • Stylesheets

These must be stored in the resources/ directory within the plugin.

Resources can then be accessed by URL with the format:

/resource/<plugin-id>/path/to/resource/file.ext

In templates:



{devblocks_url}c=resource&plugin=example.plugin&f=path/to/resource/file.ext{/devblocks_url}


From bot scripting:



{{cerb_url('c=resource&plugin=example.plugin&f=path/to/resource/file.ext')}}


All plugin resources are public (world readable) and do not require a valid session to access. Do not store private content in this directory.