[Myghty-users] resolution with module component "module root"
Brought to you by:
zzzeek
From: David G. <dg...@sp...> - 2006-02-08 21:35:53
|
Hi, Some questions: 1. I have noticed that using "module root" method of resolving, that if you type a .myt file which is in the "component root", myghty will attempt to execute the .myt directly. This also happens with, say, a .myc file. a) how do you prevent this? (i.e., prevent direct execution of any file other than through methods which the module component allows, so as to get a "404" otherwise). I still want to use module root, if possible. b) it says in the docs that by naming components you don't want to execute to things other than ".myt", they won't execute by default. Why is this not happening here? 2. I like the "module root" method of resolution because it is simple - at least the part where all I have to do is specify a controller to apache, and the public methods within a class will be called via mapping from a url. a) Using the idea of a controller with module root, how do you do this with *multiple* controllers? Eg., I want to map /app1/edit/func1/a/b... -> edit_controller (so that "func1" inside edit_controller gets called, which can then use a and b as arguments...) /app1/display/func1/a/b ... -> display_controller (so that "func1" inside display_controller gets called,....etc) b) And if that's not possible with "module root", is it possible to duplicate this effect using the "module_components" configuration, so that the functions are automatically mapped to the public methods in the specified controller like it does with "module root" I apologize if this sounds elementary, but I am still confused as to how to tune resolution stuff for myghty without having to use custom or Routes. Thankyou very much. David |