jsreport/jsreport-core

Relative file references

pofider opened this issue · 1 comments

It would be great to support the scenario mentioned in this comment

  • each template is within a folder
  • you can add img + custom CSS within your folder any template specific information will be referenced relativelly
  • if you want to use some common libs like jquery or bootstraps, reference to them in the folder ../static/{css|js|img}
  • rendering template with relative links to the local img + css or the global static assets just works

The issue here is that this makes sense only for fs store. We would need to find a way how to make this consistent with other stores. We could maybe add support for storing object in hierarchies. Then user can put assets into the folders to templates and reference them just like std images, css or scripts where the relative path would be resolved dynamically using base tag targeting our endpoint.

After the implementation of assets and folders, this doesn't seem to be needed anymore.