Welcome Guest, Not a member yet? Register   Sign In
Problem with routing using modular extensions
#1

[eluser]Lykos22[/eluser]
Hi I'd like some help please.

I'm using wiredesign's modular extensions and my folder structure looks like the description of this article (please review the 3rd one about modules)
Code:
- controllers
   -- admin
      --- dashboard.php // the main page of the admin panel, and login logout
- modules
  -- blog
     --- controllers
         ---- admin.php
         ---- blog.php
     --- models
         ---- blog_model.php
     --- views
         ---- admin
              ------ index.php
         ---- index.php (frontend)
- views
  -- admin
      --- main_layout.php
      --- dashboard
           ---- index.php
           ---- login.php

In order to swap the segments around and emulate like /admin/blog I have set up my route like this
Code:
$route['admin/([a-zA-Z_-]+)/(:any)'] = '$1/admin/$2';
so it would be like 'admin/bog' instead of the default 'blog/admin'. However when i click this link
Code:
echo anchor('admin/blog', 'View Blog-Posts');
or try to access this page through the url I get an 404 error. Any ideas what I'm doing wrong?




Theme © iAndrew 2016 - Forum software by © MyBB