Modular Extensions - Version 4.3 |
[eluser]wiredesignz[/eluser]
Using methods - A mini tutorial. First create a method. ie: modules/showroom/methods/help.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Three ways of using methods in your module: Code: <?php
[eluser]wiredesignz[/eluser]
Version 4.0.17 is available on the wiki Corrected method home path to match module home path
[eluser]jaume[/eluser]
can't get this to work... When remapping to the default module/method all is ok, but when typing a module in the adress it says site.com/module does not exist. I've picked and modified the code from 4 different threads... How about some example app and/or documentation? It would be really appreciated! ![]() This is my default controller: Code: class default_controller extends Controller { this is the routes.php Code: $route['default_controller'] = "default_controller"; This is a testing module: Code: class Home extends Module { Any thing else you need to check it? TIA. Jaume.
[eluser]wiredesignz[/eluser]
Are you also using .htaccess and have you set $config['index_page'] = ""; ? Mybe you should try the example shown on the wiki to get familiar with ME.
[eluser]wiredesignz[/eluser]
Version 4.0.18 is available on the wiki Added a few comments to the code Fixed a bug when instantiating module methods
[eluser]wiredesignz[/eluser]
If you asked for a tutorial, here we go, I grabbed Developer13's Inktype blog application and ported it over to use modules. Thanks D13 ![]() Here's a few code samples: application/controllers/public_controller.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
[eluser]wiredesignz[/eluser]
Tutorial Continued... application/modules/blog/methods/home.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
[eluser]Avatar[/eluser]
thank you, makes sense I can see how this is beneficial compared to modules within modules. ![]() Please checkout this thread I pasted if you have time. http://ellislab.com/forums/viewthread/73853/ ![]() ![]()
[eluser]jaume[/eluser]
[quote author="wiredesignz" date="1205205011"]Are you also using .htaccess and have you set $config['index_page'] = ""; ?[/quote] He comes my .htaccess: Code: - - - And, yes, I've set the $config['index_page'] = ""; I'll check the code you have posted. Thanks, Jaume.
[eluser]wiredesignz[/eluser]
Hey jaume, You may wan't to use the forum [ code ] tags, when posting code, it makes reading your submission easier. Thanks. |
Welcome Guest, Not a member yet? Register Sign In |