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

What is 'may_terminate' in zend framework 2?

I am beginner working with Zend. I have seen may_terminate in module route configuration. I don't understand what it is for. According to ZF2 official docs, the option “may_terminate” hints to the router that no other segments will follow…
Geek
  • 8,280
  • 17
  • 73
  • 137
25
votes
1 answer

Translate url parameters as place holder

I wondering how to translate a URL in ZF2 that has a parameter on it. For example: /{:language_link-schools-:city_link} The reason why I don't do: /:language_link-{schools}-:city_link It is because in some languages, for example, Spanish, the…
peterpeterson
  • 1,315
  • 2
  • 14
  • 38
18
votes
3 answers

How to get the dispatched route name in Zend framework?

Current state: A router is loaded from xml file two route name within the router are going to the same controller and action, for example: www-language-employee and www-language-trainer are going to the same controller and action -->…
Agustinus
4
votes
1 answer

zend rest controller routing to specific controller

I am fairly new to zend framework. I have been trying to write RESTful controller using Zend_Rest_Controller. I built one from a good tutorial http://www.techchorus.net/create-restful-applications-using-zend-framework It works perfectly. So I went…
4
votes
2 answers

ZF2 Routing as in ZF1

How can I make the routing automatically work for everything in the ZF1 structure? module/controller/action/par1Name/par1Val/par2Name/par2Val/ I read the information about routing, but the way I see it, I'd have to add all actions manually, and I…
Kris
  • 824
  • 2
  • 12
  • 28
3
votes
1 answer

Routing for country , province , city , product in Zend Framework

This url structure is proposed for SEO optimization. So suggesting another structure will not work. Structure proposed is example.com///// example.com/en/spain I wish to point to CountryController…
Hari K T
  • 4,174
  • 3
  • 32
  • 51
3
votes
3 answers

ZF2: create url aliases in router

I'm new to Zend Framework 2 and i want to learn this framework. I want to create url aliases in router. For example, I have defined something like this in module.config.php 'router' => array( 'routes' => array( 'home' => array( …
mkatanski
  • 508
  • 6
  • 19
2
votes
2 answers

Zend Routing Not Working

I am trying to set up my zend route using the routes.ini and bootstrap but for some reason it is not able to route as expected. My routes.ini and bootstrap.php are as follows. routes.ini [production] routes.guestbook.route =…
javaadgrid
  • 49
  • 6
2
votes
1 answer

Zend Regex Routes in Application.ini not recognized

I've been struggling with this problem the last 2 hours. I'm trying to add a regex-route to my Zend Framework (V1) application. My other routes are static and stored in my application.ini file and that is where i want to put some new…
Frontliner
  • 31
  • 3
2
votes
1 answer

Route mit special characters are not parsed correctly in Zend Framework 2

URIs with german special characters don't work (error 404). I've already had this problem (here) and it has been resolved with the unicode modifier and a custom view helper, that uses it. Now I have the same issue with a Segment child route, but…
automatix
  • 14,018
  • 26
  • 105
  • 230
2
votes
2 answers

ZF2: How to get Zend\Navigation inside custom route?

I have custom router and I have to get access to Zend\Navigation inside this custom router. I was googling, asking and searching and no results :/ All I need is to find nodes with 'link' param using Zend\Navigation in my Alias::match function. Here…
mkatanski
  • 508
  • 6
  • 19
2
votes
2 answers

Zend Router URL array merge

I have a problem with custom zend router. this is my cat router $frontController = Zend_Controller_Front::getInstance(); $router = $frontController->getRouter(); $router->addRoute('categories', new Zend_Controller_Router_Route( …
2
votes
4 answers

ZEND - Conflicting route patterns

I'm using Zend framework 1.12, trying to come up with custom routes. I'm trying to create something that looks like facebook's profile URL (http://facebook.com/username). So, at first I tried something like that: $router->addRoute( …
Pedro Cordeiro
  • 2,085
  • 1
  • 20
  • 41
1
vote
1 answer

Zend Framework route for generic pages?

I'm building a Zend Framework sites. It's MVC, so uses controllers so I have controllers like NewsController that is accessed via /news etc. However, another of my controllers is PagesController, which handles just static content pages. My…
Martin Bean
  • 38,379
  • 25
  • 128
  • 201
1
vote
2 answers

Hostname and regex-based route in Zend Framework

Is it possible to create a router in Zend Framework that can match hostnames using a wildcard or regular expressions (no matter how many parts are in the hostname)? I can create a route that matches based on a hostname $externalHostname = new…
Luke Eller
  • 627
  • 1
  • 7
  • 23
1
2 3 4 5 6