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
0
votes
1 answer

Routing in Zend Framework of two modules

I have created controller : module/default/index/login I have added routing in main bootstrap $router = Zend_Controller_Front::getInstance()->getRouter(); $route = new Zend_Controller_Router_Route(':action', array( …
0
votes
1 answer

Zend framework 3 routers in separate file (not in config array tree)

I am using this tutorial https://docs.zendframework.com/tutorials/getting-started/overview/ for creating album module. It works for me. Inside project there is /module/Album/config/module.config.php file which contains routes. Routers are located…
webprogrammer
  • 2,393
  • 3
  • 21
  • 27
0
votes
2 answers

redirect different view scripts

I want to redirect to different viewscripts depends on a searchtype the user can fill in. For example: The user wants to search for a person, than I want to use the matching viewscripts for persons (ansprechpartner). Please have a look at a part of…
pia-sophie
  • 505
  • 4
  • 21
0
votes
0 answers

ZF3 advanced routing - parent and child routes with action param

Using ZF3, I'd like to access URLs like : /dossier/add /dossier/edit/2 /dossier/edit/2/droit/add /dossier/edit/2/droit/edit/3 ... Here is my routing config : 'dossier' => [ 'type' => Segment::class, 'options' => [ 'route' =>…
plugnplay
  • 43
  • 7
0
votes
0 answers

ZF3 How to use optional parameter in homepage route

I'm having trouble adding an optional parameter to my home route. This is my current router: 'routes' => [ 'home' => [ 'type' => Segment::class, 'options' => [ 'route' => '/[:salon/]', 'constraints' => [ …
MulOnPomm
  • 145
  • 3
  • 16
0
votes
1 answer

Incomplete links generated in hal (zend-expressive-hal + zend-router)

My routes def: 'router' => [ 'routes' => [ 'TimeTable' => [ 'type' => 'Literal', 'options' => [ // Change this to something specific to your module 'route'…
neradp
  • 11
  • 2
0
votes
1 answer

Zend routing issue

I'm working on converting a (quite sloppily put together) zend expressive website to a zend framework 3 website for a local restaurant. When I set up the routing on the expressive website I would load a location based on a query parameter looking…
0
votes
3 answers

ZF3: How to route to specific controller/action based on method and route?

In my module's module.config.php, I have something like this: namespace Application; return [ //... // myroute1 will route to IndexController fooAction if the route is matching '/index/foo' but regardless of request method 'myroute1' =>…
evilReiko
  • 19,501
  • 24
  • 86
  • 102
0
votes
1 answer

Change languages URL route from 'en_US' to 'en'

Zend languages is by default routing urls that way: /en_US/mypage /fr_FR/mypage How can I change the route from 'en_US' to 'en' and 'fr_FR' to 'fr', example: /en/mypage /fr/mypage
0
votes
1 answer

Zend Framework Routing - child route works but not main route

I have what I hope is quite a simple question, but it's been taking me a while to figure out... I have tried to setup a /settings route in Zend. I do not have a module for settings but I have setup the necessary views and controllers within the…
0
votes
1 answer

What schould be the output of Zend\Mvc\Router\RouteInterface::assemble() in ZF2

I'm writing my custom router for a Zend Framework 2 project extending Zend\Mvc\Router\RouteInterface. The routes should come from a database (large project with hundreds of pages). A working Router obviously only needs two methods: match() and…
mdthh
  • 1,248
  • 1
  • 13
  • 22
0
votes
1 answer

Zend Framework route not working when passing URLs as route parameters

When I try to pass a URL in the route below it gives me 404 error. If I replace the URL with any other string it works. This is the route. $route = new Zend_Controller_Router_Route( 'user/logout/:preserve/:ref', …
Jay Bhatt
  • 5,601
  • 5
  • 40
  • 62
0
votes
1 answer

Zend_Controller_Router_Route_Regex - please help me with the fourth parameter

I have this example: $route = new Zend_Controller_Router_Route_Regex( 'blog/archive/(\d+)-(.+)\.html', array( 'controller' => 'blog', 'action' => 'view' ), array( 1 => 'id', 2 => 'description' …
Andreea
  • 139
  • 12
0
votes
0 answers

Zend_Controller_Router_Route_Regex rewrite all my module links

I'm using Zend_Framework 1. In my Bootstrap.php I rewrite my categories link something like that: $route = new…
Andreea
  • 139
  • 12
0
votes
2 answers

Zend controller Url in view

I have a url /module/controller/action/id/10 And what want to achieve is to generate the following url for an A tag inside a view partial /module/controller so basically I want to remove action name and extra id parameter How can I do it using…
djkprojects
  • 425
  • 1
  • 5
  • 8