Setup SES on per module basis?

Hi,

How can I setup SES on a per module basis? Basically I have a few
modules in my app and typically I've setup SES in the ColdBox.cfc
config component but I'm trying to find out if there is a way to do
this just at the module level. If so how?

Do I just add something like this to the ModuleConfig.cfc?

{class="coldbox.system.interceptors.SES",
       properties={configFile="config/routes.cfm"}
}

Thanks,

West

All in the docs: http://wiki.coldbox.org/wiki/Modules.cfm#SES-URL_Mappings

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

I was able to get my module to use SES routing, but only by calling
setEnabled(true) in the parent's "routes.cfm" file. I only want SES
routing for one of my modules and turning this setting to true in
Routes.cfm seems to cause my other modules to use SES routing also

I must be missing something...

From what I recall from modules class that would be expected. You would have to separate your apps into different coldboxes.

Make sure the this.entryPoint in your module config is factory. That’s it.

Hi Lius,

Thank you for the fast response.I really appreciate it.

I tried it but still I have to use module name inside my url to get to the files in modules.

I have added something like this:

<cfset addModuleRoutes(pattern="/factoires/:factoryname", module=“factory”)>

function PathInfoProvider(Event) { var rc = Event.getCollection(); var prc = Event.getCollection(private=true);

local.URI = CGI.PATH_INFO;

// if we have a subdomain, its a factory site
local.servername = cgi.server_name;
local.servername = replacenocase(local.servername, “factory.com”, “”);
local.servername = replacenocase(local.servername, “www.”, “”);
local.servername = replacenocase(local.servername, “.local”, “”);
local.servername = replacenocase(local.servername, “.”, “”);
if(len(trim(local.servername)) and local.servername neq “staging” and local.servername neq “www”)
{
local.URI = “/factories/” & local.servername;
}

return local.URI;
}

This will get me to the default layout of the module together with the routes in ModuleConfig.cfc i.e

// SES Routes
routes = [
// Module Entry Point
{pattern="/", handler=“main”,action=“index”},
// Convention Route
{pattern="/:handler/:action/:id"},
{pattern="/:handler/:action?"}
];

After this what happens is I am only getting the main.index for every other events inside the modules.

AM I DOING SOMETHING WRONG HERE???