Paths in Fuel are always fully lowercase, so your "controlPanel" dir should be "controlpanel".Raitis Stengrevics wrote on Monday 30th of May 2011:I'm working on Control Panel that will allow admins to control things as users, news etc.. Is this structure of controllers okey? -- Controller_ControlPanel (location: controller/controlPanel.php)
---- Controller_ControlPanel_Users (location: controller/controlPanel/users.php)
---- Controller_ControlPanel_News (location: controller/controlPanel/news.php)
I normally put more than one method in each controller, so for me it would look like this:And of views... -- controlPanel.php
---- controlPanel/users.php
---- controlPanel/news.php Is there any better examples? Best practices? Thanks.
You should view directories as extensions of the controller, thus a Controller_ControlPanel_Users should extend the Controller_ControlPanel functionality (in application design, not actual PHP programming). If you need self contained modules, you probably prefer modules.P.S. Is there any way how to get Controller_ControlPanel into directory of controller/controlPanel? So they would be better organized.
It looks like you're new here. If you want to get involved, click one of these buttons!