I'm trying to have this kind of file arrangement with fw/1 [1]:
Application.cfc
/views/main/default.cfm
/wwwroot/index.cfm
My apache config serves wwwroot as the DocumentRoot, which allows me
to keep all my views, controllers, application.cfc etc out of the web
root.
I can't seem to find the right combination of
getCurrentTemplatePath(), expandPath() or whatever to make this work.
<cfset variables.framework.base="../" /> doesn't work either...
Can anyone shed any light?
Many thanks
Geoff
[1] http://livedocs.adobe.com/wtg/public/coding_standards/structure.html
Could you put Application.cfc in /wwwroot and see if that works? That
combination has been tested.
variables.framework.base = "../"; should work with Application.cfc in
/wwwroot but I suspect the relative path doesn't understand what to do
when index.cfm and Application.cfc are in different places...
Sean
No joy - I can't seem to get base="../" to work, even with both
app.cfc and index.cfm in the web root. That's on both CF8/Apache and
Railo (Express)
Still experimenting...
Thanks
Geoff
<cfset this.mappings["/views"]="#replace(getDirectoryFromPath(getCurrentTemplatePath()),"\","/","all")#views">
... which works, but doesn't feel as "nice" as something like <cfset
variables.framework.base="../"> would.
So, my views and Application.cfc are outside my webroot which I like -
I don't want hackers poking around in myapp.com/views
/controllers next...