Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] URL dispatcher
#1

[eluser]sirtea[/eluser]
Let's supose we have subclassed model of objects

object_primary and object_secondary

i have a method index in controller objects that generates a menu-dispatcher to subclass options, and a sort of folders with their own controllers

Code:
/controllers
|-> objects.php
|-> objects
    |-> primary.php
    |-> secondary.php

I'm expecting a behaviour like
Code:
<url>/objects                    -> objects.php::index()
<url>/objects/primary/index      -> objects/primary.php::index()
<url>/objects/primary/add        -> objects/primary.php::add()
<url>/objects/primary/delete     -> objects/primary.php::delete()
<url>/objects/secondary/whatever -> objects/secondary.php::whatever()

It seems that codeignitere makes a mess with the repeated name of the folder and controller; if you rename one of them it works as expected, althous is kind of ugly.

¿Any suggestion?


Messages In This Thread
[SOLVED] URL dispatcher - by El Forum - 08-17-2010, 03:05 AM
[SOLVED] URL dispatcher - by El Forum - 08-17-2010, 03:09 AM
[SOLVED] URL dispatcher - by El Forum - 08-17-2010, 03:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB