Subdirectories Controllers and Views
Posted 26 November 2008 - 01:30 PM
Would like to suggest to lowercase the full ControllerID path, and (by convention) UCfirst the ControllerID. This way upper/lowercase url typos will resolve always.
This will mean all paths under controller needs to be lowercase by convention.
Besides that was wondering why a path to a view in a subdirectory doesn't use the dotted Path Alias.
Posted 26 November 2008 - 01:42 PM
The main reason for using slashes in view paths is because sometimes we need to specify a view like '/path/to/view'. Using a dot would make it look like '.path.to.view', not as intuitive as the former.
Posted 26 November 2008 - 05:39 PM
Someone using caps lock by accident (entering HTTP://DOMAIN/ADMIN.USER/) will get a 404 for sites running on Linux. Thats not necessary, since it could be easily corrected according to convention.
The reason I mentioned views using slashes and not path alias, not a big deal, but its used almost everywhere else, so perhaps would be more consistent, and will give the opportunity to store some of them at another place without touching the controller files. For instance: beta layout etc.
*EDIT* About the views: plenty options with themes for that. Sorry, still very new to Yii
Posted 27 November 2008 - 05:04 PM
If you want to use the slashes you should look more into the CUrlManager