Hi,

Currently, working with selectors requires you to put scripts in
subfolders, for example

/apps/foo/html.esp
/apps/foo/someselector/html.esp

and worse, all GET scripts which produce html are named html.esp,
which can be confusing when editing them.

We talked about this with David and Felix, here's a proposal for
simplifying those names in the "happy case", while keeping the current
conventions to resolve potential name conflicts where needed. Comments
welcome.


= Proposal =

The following variants should be accepted for script names, examples:

a) sling:resourceType=foo, request = bar.html

Sling searches for the following scripts and uses the first one found:

  /apps/foo/html.esp
  /apps/foo/foo.esp

The only change is that the script used for html rendering can
optionally be named foo.esp, to avoid having many scripts called
"html.esp" which is not practical when opening many of them in an
editor or IDE.

a) sling:resourceType=foo, request = bar.selector.html

The following scripts can be used to process this request, the first
one found being used:

/apps/foo/selector/html.esp
/apps/foo/selector.html.esp (same but with dots instead a subfolder)
/apps/foo/selector.esp
/apps/foo/html.esp (not specific to the selector)
/apps/foo/foo.esp (not specific either)

In the "happy case" people would then just have those two scripts to
handle the above cases:

/apps/foo/foo.esp
/apps/foo/selector.esp

-Bertrand

Reply via email to