Questions tagged [zend-router]

zend-router is a tag suitable for any questions regarding routing in Zend Framework's MVC implementation, url handling, or any other matter affecting or affected by routing in Zend Framework.

zend-router is a tag suitable for any questions regarding routing in Zend Framework's MVC implementation, url handling, or any other matter affecting or affected by routing in Zend Framework.

78 questions
1
vote
1 answer

Adding language route to an existing route with Zend_Router

I'm trying to define a language route working with an existing route. The idea is to make work the following urls: /en/dashboard/usability-testing/setup /fr/dashboard/usability-testing/setup The problem is that they only work without the language…
1
vote
1 answer

Zend router behaviour

I have some trouble with the router. I have a custom route : $router->addRoute('showTopic', new Zend_Controller_Router_Route('/forum/topic/:topic', array('module' => 'forum', …
Peekyou
  • 471
  • 1
  • 5
  • 21
1
vote
1 answer

Zend Framework route for Sub Folders with Rest

For my current Application Setup i am trying to create a routing for Standard Controllers and Rest Controllers. This is my Structure. /application /modules /module /controllers /Admin /Api To call a Controller within the…
1
vote
1 answer

Zend framework does not care about the Custom Route specified

I created a router and added to the controller like this public function _initRouting() { // Get Front Controller Instance $front = Zend_Controller_Front::getInstance(); // Get Router $router = $front ->…
mrN
  • 3,734
  • 15
  • 58
  • 82
1
vote
2 answers

What are the different ways to configure routes?

If someone is familier with Zend Framewor, they know what routes are and how they affect the system overall. My question is concerned about ways to can configure this routes. I know two ways to configure them, through Bootstrap.php and…
Starx
  • 77,474
  • 47
  • 185
  • 261
1
vote
1 answer

ZF3 route with access to db

I am new to zend framework 3 and I am trying to create a new route type that can search in the database to match the route path. I am using doctrine orm and unfortunately I don't know how to inject the entity manager inside the route class. I tried…
Calin
  • 53
  • 1
  • 5
1
vote
1 answer

Host name routing in Zend Expressive

Zend Expressive has an adapters for Aura.Router, FastRoute and zend-mvc Router and the route can match the method and path easily: get('/foo', $middleware); With zend-mvc Router component it is possible to match the hostname:
Vasil Dakov
  • 2,040
  • 2
  • 19
  • 38
1
vote
0 answers

How to dynamic subdomain for hostname on Zend Framework 1.12?

I want create custom subdomain for mym project with hostname, then i want load application logo based sub domain. I have added below code in bootstrap.php in _initRouter() function. $hostnameRoute = new…
1
vote
2 answers

How to route pages using text instead of IDs?

Currently, my Zend application routes using the URL: example.com/news/12 Selects the news with ID 12 to display on page. But the client wants to use only text, example: example.com/news/man-dies-after-burning-himself Does someone knows how can it…
1
vote
2 answers

ZF2 Child routes doesn't work

I have a simple config and controller in module Blog: module.config.php: return array( 'controllers'=>array( 'invokables'=>array( 'Blog\Controller\Blog'=>'Blog\Controller\BlogController', ), ), …
1
vote
1 answer

zend framework 2 - issue in using same route name in two diffrent modules

I am trying to use same route names for the 2 different modules, is it possible? Module User : /*Module.config.php*/ 'dashboard' => array( 'type' => 'segment', 'options' => array( 'route' …
mark winkle
  • 206
  • 1
  • 3
  • 17
1
vote
1 answer

How to access child route by its name, but not "parent_route/child_route"?

I have route zfcadmin/news. I added route categories as child route to zfcadmin/news. Now I can get this route by zfcadmin/news/categories in views: $this->url('zfcadmin/news/categories', array('action'=>'add')); Is it possible to get route by its…
Sharikov Vladislav
  • 7,049
  • 9
  • 50
  • 87
1
vote
4 answers

Zend framework edit a record

I am trying to create edit records functionality in my listing page. But i am getting following error when clicking on edit link against record. A 404 error occurred Page not found. The requested URL could not be matched by routing. No Exception…
sachin
  • 93
  • 14
1
vote
1 answer

Zend Framework multi-word action names

This question has been asked many times but for some reason the proposed solution isn't working for me. I wan't to use names like "deleteDefaultUser" for my action. To achieve this I have done following. Added a route $route = new…
Jay Bhatt
  • 5,601
  • 5
  • 40
  • 62
1
vote
0 answers

Route from Zend_Router_Route_Regex with optional parameters returns only default values

I want to create route that matches: search-results/result_Abc search-results/result_Abc,11 search-results/result_Abc,2,3,4,6 and so on. In other words - I want to have default values when link doesn't provide them. Route…
ex3v
  • 3,518
  • 4
  • 33
  • 55