Questions tagged [zend-route]

Routing in Zend Framework's MVC implementation. Zend Framework is an open source, object-oriented web application framework implemented in PHP 5 and licensed under the New BSD License.

zend-route 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.

319 questions
0
votes
1 answer

How to use multiple parameters in a ZF1 Route

i was trying to add new routes to my Zend Framework 1 application. But it seems to understand my 2 params as one. How can i fix that? $route = new Zend_Controller_Router_Route(':name-:type', array('controller' => 'tour', 'action' =>…
Jochen Ullrich
  • 568
  • 3
  • 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 Framework 2: Hostname and redirection

I need to create a route in a zend framework 2 project that helps me to create these url: http://username.test.com and .net http://www.test.com and .net Code: array ( 'routes' => array ( …
Michelangelo
  • 1,398
  • 2
  • 14
  • 37
0
votes
1 answer

Zend Framwork 2.2 standard route (/) could not be matched by routing

I've been looking for a solution for days but cannot find a solution. Help! I've installed Zend Framework 2.2 and have implemented a MVC application with several routes, controllers and views. On my development system all is well. Locally I use a…
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
1 answer

how to make routing URL for our wish in zendframework using routes.ini file?

I need to the routing URL like the following http://www.website.com/module-name/controller-name/{article-name}/{article-id} i tried using the routes.ini file but it's not working routes.index-latest.route =…
raheem.unr
  • 797
  • 1
  • 7
  • 16
0
votes
1 answer

Zend Framework routes with Zend_Config_XML

I need to convert my existing routes.ini file to an XML file (my host disabled parse_ini of PHP). Anyway, I couldn't find proper examples so I tried my luck using the conventional Zend_Config_XML structure. See below:
0
votes
1 answer

Match multiple domains with zf2 router

I need to match 2 different domains with my ZF2: www.gamempire.it is the base www.rankempire.it have to match to only a specific controller So I tried adding this to my router configuration, but with no success (it match to my default…
Oscar Fanelli
  • 3,337
  • 2
  • 28
  • 40
0
votes
1 answer

Route sudmains controller with Zend

I have the following structure on my app: Modules => default => site.com blog => blog.site.com admin => admin.site.com I used this code on my bootstrap to allow subdomains and redirect to the follow…
wiLLiamcastrO
  • 238
  • 3
  • 13
0
votes
1 answer

Zend Framework URL assembly ignoring translation

I have following Route setup: routeXY.type = "Zend_Controller_Router_Route" routeXY.route = "@XY" routeXY.defaults.module = "default" routeXY.defaults.controller = "index" routeXY.defaults.action = "actionXY" Then also pair in my translation array…
Ivan
  • 315
  • 1
  • 3
  • 16
0
votes
1 answer

ZF2 child routes- ajax doesn't return correct route name

I have weird(in my opinion) problem with Zend Framework 2. After I call my ajax function route name is not correct. Here is a part of my routing: 'ajax' => array( 'type' => 'Literal', 'options' => array( …
user1409508
  • 623
  • 1
  • 12
  • 38
0
votes
1 answer

Zend Framework 2 match current url to route

I'm trying to match the current url a user is on to a route, and output an 'active' class if the route matches: url() == $this->url('dashboard')) echo "class='active'" ?> This works on routes that exist. However, this will mess up…
Ethan
  • 85
  • 1
  • 8
0
votes
1 answer

Zend Translate Routing for custom modules

How do I have to set up the routing for a default language in Zend Framework on a custom module, in my case the admin module. I have the following code: $langRoute = new Zend_Controller_Router_Route( ':lang/admin', array( 'lang' =>…
Tudor Ravoiu
  • 2,130
  • 8
  • 35
  • 56
0
votes
1 answer

Optional parameters in Zend controller action

In my admin module, in the index controller i have multiple filtering options. The filtering is pretty simple done, based on the parameters, ie: http://www.site.com/admin/pages/by/date_added/order/asc -> This orders the pages by "date_added"…
Tudor Ravoiu
  • 2,130
  • 8
  • 35
  • 56