Hi Nico,

This is something I had been wanting to do as well. I had given it some thought, but haven't actually demo'd anything.

Have you considered something like the following:

1. Have resource type 'sling/script/esp' with property "location"
2. Create a resource somewhere in the content tree with location='/apps/scripts/myscript.esp' 3. in apps/sling/script/esp/html.esp, do something like sling.include(currentNode.location)

I'm pretty new with sling, I'm not sure if sling.include could be used in this way. The idea is that sling/script/python could handle the python dialect of sling.include, and so on.

If my crazy idea is nonsense, then I surrender to just +1 the idea.

Best,
Branden

Nicolaas Matthijs wrote:
Hi,

I know that Sling allows me to associate a (ruby, python, esp, ...) script
with a certain Resource Type.

However, I would like to do something slightly different. Let's say I've
created a script at:

/some/folder/examplescript.py

I now want to be able to hit that URL directly and have Sling execute that
script for me, instead of downloading the source code of that script (which
seems to be the default behavior).

I've also found this e-mail thread from quite a while ago:

http://markmail.org/message/dyyfelg7vnwghnbh

This suggests to me that it is a desired feature of Sling to do this and also
mentions a possible solution for the problem. However, when I try to go here:

/some/folder/examplescript.py.html

nothing happens.


So my question is: does Sling still support direct script execution and if
so, how should I use it?



Thanks,
Nicolaas



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Reply via email to