Questions tagged [zend-controller-router]

Standard router component in Zend Framework. Zend Framework is an open source, object-oriented web application framework implemented in PHP 5 and licensed under the New BSD License.

zend-controller-router is a tag suitable for questions regarding standard router component in Zend Framework.

56 questions
6
votes
2 answers

Run the same Zend_Framework site on multiple domains with Zend_Controller_Router_Route_Hostname

I need to run the same site based upon the zend_framework to run on multiple domains and my application needs to be aware on which domain it is running on. I thought it was a good idea to use Zend_Controller_Router_Route_Hostname, but I have run…
vdrmrt
  • 862
  • 8
  • 14
4
votes
3 answers

Zend_Controller_Action _forward use (or abuse) cases

While developing a web app using ZF, I had an haha! moment regarding the _forward method in Zend_Controller_Action. As stated in the Programmer's Reference Guide, when calling the _forward method inside an action, the requested action will not be…
Fatmuemoo
  • 2,187
  • 3
  • 17
  • 34
4
votes
1 answer

How do I write chains of chains of ... of route in a ini file for the Zend framework?

I am trying to define routes as below with an INI file for the Zend Framework: http://api.example.com/servicename/{version}/users/:userid/items/:itemid routes.host.type = "Zend_Controller_Router_Route_Hostname" routes.host.route =…
Kenji Baheux
  • 596
  • 4
  • 14
3
votes
2 answers

Optional param Zend Route Regex

How to make route regex parameters optionals with Zend ? I try to make well formatted URLs ("search?s=mp&t=w" instead of "search/index/s/mp/t/w") for search filters, ex. : Popularity Most popular (s=mp) Most viewed (s=mv, default) Top rated…
Benjamin
  • 382
  • 4
  • 12
2
votes
2 answers

Router for custom module not being recognized by Magento

I am following this tutorial to create a custom module. For some reason i can't get magento to recognize the routers( i get a Magento 404 error) when i hit http://exmaple.com/helloworld/index/index. I've verfied that the module is enabled in the…
russjman
  • 486
  • 9
  • 19
2
votes
1 answer

Is there a way to change the route variable separator in Zend Framework?

I'd like to change the way URLs that Zend Framework is generating from this: $routeString = '/section/:sectionName'; $route = new Zend_Controller_Router_Route(routeString, array( etc, etc... ); ...to this... $routeString =…
Julian
  • 8,808
  • 8
  • 51
  • 90
2
votes
1 answer

Zend_Navigation incompatible with Zend_Router when writing controller/actions?

Novice Zend Framework developer here trying to figure out a simple solution to a Zend Routing problem. I'm sure one of you pros can lend a hand. I have a website (built in Zend Framework using Zend_Navigation) that contains 75% static HTML page…
2
votes
2 answers

Zend_Controller_Router_Route

I'm trying to make a Router that can respond to this structure: module/controller/action/id and module/controller/action/page The only difference is is 'id' or 'page'. I'm using this code: $routeAdmin = new Zend_Controller_Router_Route( …
returnvoid
  • 434
  • 1
  • 7
  • 19
2
votes
0 answers

I want to array parameter with Zend router in ZF1

I want to customize url by Zend_Controller_Router. I know the way when parameter is 1. like this url /fruits?name=banana is able to write by Zend router /fruits/banana $route = new…
hiro
  • 21
  • 3
2
votes
2 answers

Zend Router (How to direct url such as /administration/users to Administration_UsersController)

I would like to keep the old default Zend Router, and just add a router for administration subpages since the controllers are growing in size and I would like to logically separate them a little as well as have cleaner URLs. The documentation seems…
olive
  • 1,194
  • 1
  • 15
  • 34
2
votes
0 answers

How do I structure Zend_Controller_Router_Route to handle the action and a param key in the same position?

Here is my route in JSON: "jobs": { "type":"Zend_Controller_Router_Route", "route":"/jobs/:action/:id/*", "defaults": { "module":"api", "controller":"jobs", "action":"index", "id":0 } } This allows for URIs…
talentedmrjones
  • 7,511
  • 1
  • 26
  • 26
2
votes
1 answer

Zend_Controller_Router_Route: Could not find a translator

I am developing a multilanguage application. In the bootstrap there is the routes setup: protected function _initRoutes() { $this->bootstrap('frontController'); $router = $this->frontController->getRouter(); // PAGES ROUTE $page =…
1
vote
1 answer

How to use a dash as separator in a Zend_Controller_Router_Route

Currently one of my routes looks like this new Zend_Controller_Router_Route( 'aviso/:url_id/:slug', array( 'module' => 'postulante', 'controller' => 'aviso', 'action' => 'ver', 'url_id' => ':url_id', 'slug'=> ':slug' …
texai
  • 3,696
  • 6
  • 31
  • 41
1
vote
2 answers

Zend render static / dynamic with multi controllers

I'm pretty new to Zend (read the documents concerning routers and controllers). My StaticController and IndexController : class StaticController extends Zend_Controller_Action { public function displayAction() { $page =…
1
vote
3 answers

Zend Router Question

I use modules layout to structure my controllers: :module/:controller/:action I would like to add a new custom route so that the following url will work. domain.com/username where username is a username of any registered user on the website. Can…
iBiryukov
  • 1,730
  • 4
  • 19
  • 30
1
2 3 4