Loading Controllers not in folder controllers |
[eluser]pisio[/eluser]
hi , hi ! How I can load controller "/protected/admin/panel.php" = {A} instead "/applications/controllers/panel.php" = {B} And if there is {B} extends {A} if there is NO {B} to load only {A} controller ? I tried with {B} file : include {A} ; class {B} extends {A} {} And class {A} extends CI_Controller {} but its crashed
[eluser]rana[/eluser]
are the file “/protected/admin/panel.php” inside 'controllers' directory? If not, you should place the extendible classes in 'application/core' instead of anywhere else. For your moduler design of controllers, you can use codeigniter HMVC plugin as well.
[eluser]pisio[/eluser]
[quote author="rana" date="1358154328"]are the file “/protected/admin/panel.php” inside 'controllers' directory? If not, you should place the extendible classes in 'application/core' instead of anywhere else. For your moduler design of controllers, you can use codeigniter HMVC plugin as well.[/quote] No. My idea is : I have ROOT_DIR / applications/ controllers / Okey ? So I have too : ROOT_DIR / protected / controllers/ When i type in url : http://domain/admin to load controller in from protected folder. If where is no controller from protected/controllers try to load controller from application/controllers.. Main idea is where you enter to admin panel (exp ..) to load basic controller for this cms. If you wanna upgrade admin panel , so you copy and paste admin controller from protected to applications and you upgrade it :}
[eluser]Aken[/eluser]
Look into the Loader class's Packages feature. It might get you what you need.
[eluser]pisio[/eluser]
HMVC worked perfect.... But I create my solution : http://pastebin.com/qPM9ve8p http://pastebin.com/uHLsKSh4 Replace this files. Edit file routes how you wanna. For editing CTRL + F - > vortexcms |
Welcome Guest, Not a member yet? Register Sign In |