Welcome Guest, Not a member yet? Register   Sign In
wiredesignz HMVC and routes
#1

[eluser]AlexKrycek[/eluser]
I have succesfull installed HMVC from WireDesignz's bitbucket.
Works like a charm, but I cant figure out one thing.

Structure is like

/application
/controllers
/models
/plugins
/news
/controllers

config file in application adjusted so that the plugins folder is found.
This is working,

When I goto localhost/news it is picking up the plugins and its working.
However I want is accesible from localhost/backend/news. This is giving me a 404 not found (due to the backend in the url). Is there a way that I can have admin as uri "prefix" ?
#2

[eluser]Tpojka[/eluser]
Code:
/application
  /controllers
  /models
/plugins
  /admin
    /controllers
      news.php
      members.php
#3

[eluser]AlexKrycek[/eluser]
Thanks for your reply, indeed that's working!
Also found out (bit looks like yours more a nicer way to archive it) that changing

Code:
/* use module route if available */
if (isset($segments[0]) AND $routes = Modules::parse_routes($segments[0], implode('/', $segments))) {
$segments = $routes;
}

TO

Code:
/* use module route if available */
if (isset($segments[1]) AND $routes = Modules::parse_routes($segments[1], implode('/', $segments))) {
$segments = $routes;
}

Also works, however then its only for admin




Theme © iAndrew 2016 - Forum software by © MyBB