Question On location and modules
I have gone through the tutorial on modules but I have a question or really am looking to be pointed in the right direction. Here is what I would like to do and would appreciate input. First of all the site I am working has pages setup through the admin. I have additional "pages" that are setup as a module like articles in the module tutorial. The reason I am doing this is because I need the ability to categorize etc. What I am trying to figure out is I have location setup on these module "pages" that I would like to able to have an address like
http://somesite.com/article using that location if there is no page mapped to that location. Basically if no page maps to the address check to see if it maps to one of the articles setup in the module. Does this make sense? Do you have any thoughts?
Thanks in advance.
Comments
require_once(MODULES_PATH.'/fuel/controllers/page_router.php'); class Some_controller extends Page_router { function __construct() { parent::__construct(); } function _remap() { } }
set the route to something like this
$route['404_override'] = 'some_controller';
any thing I should be aware or need to include ... this doesn't seem to be enough
The only thing that I can think of that may not work correctly is navigating to the homepage because there is some code in Fuel_page and Fuel_pagevars that specifically looks for a value of 'page_router' and if it does exist, change it to the homepage (you can see where if you search for 'page_router'). You still may be OK though so I'd test it out and let me know. I've never needed to do this myself.