Details
-
Improvement
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
-
Magnolia EE & CE 3.0x
Description
We have the possibility to select an image from disk (using "File" control) and from DMS (using "uuidLink") control.
In most cases we would like to do some image processing (e.g. image scaling). For that purpose the image has to be loaded in it's own JSP/Servlet. Currently there are three possibilities to run a sub script:
- virtualURL
- SubTemplates
- NodeDataTemplate
The best solution WOULD be "nodeDataTemplate", because it calls the sub script on content within paragraphs, which SubTemplate does not (path has to be EXACTLY the same, with different extensions). The virtualURL is tricky, because you will have to know in advance which pages will use images which need their own processing.
Unfortunately the "nodeDataTemplate" works only for control "File"!
Well, to be competitive with other CMS we need to have a way to run sub scripts in an "independent" way. This could be achieved as follows:
1) Define a content node with a property "selector" (the part between handle and extension) and a property "path". The idea is to map a selector to a JSP or Servlet. This could be e.g. selector="jpg.640.480" (or with wild cards: "jpg.." and path "/templates/global/image_scaling.jsp".
2) Extend the "nodeDataTemplate" functionality to additional controls, especially "uuidLink".