Jon Posted October 25, 2010 Report Posted October 25, 2010 I have been making some modules for the site www.usaflightclub.com however, even though my code is in the right place etc.The modules won't show just getting a "Te Module ____ Doesn't exisit@ My modules code for example: <?php class east extends CodonModule { public function index() { Template::Show('east_region.tpl'); } } ?> You Help is most welcome, Thanks, Jon Quote
Administrators simpilot Posted October 25, 2010 Administrators Report Posted October 25, 2010 Make sure your modules folder is within the modules folder and your file is within it: /core/modules/East/East.php You really should start all class files with a capital and also use a capital in the class declaration in your file class East extends CodonModule Some servers get a little picky with case and it usually can be tracked down to the naming of classes. You will save yourself some headaches with "headers already sent" errors by removing the closing php tag (?>) from your module files as well. Just a heads up also, Nabeel has started to transition the structure to the use of $this-> for commands within the files. $this->show('mytemplate.tpl'); or $this->render('mytemplate.tpl'); and to set data $this->set('data', $data); Quote
Jon Posted October 25, 2010 Author Report Posted October 25, 2010 So it'd be <?php class East extends CodonModule { public function index() { $this->render('east_region.tpl'); } } ?> ? Quote
Administrators simpilot Posted October 25, 2010 Administrators Report Posted October 25, 2010 Yes, and your folder name and file name needs to be "East" as well. Quote
Jon Posted October 25, 2010 Author Report Posted October 25, 2010 Ok, all working thanks for that Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.