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

Where is the best place to generate routes in an MVC-application?

Imagine you have the following scenario: In you application, you have several models that are "Commentable". Comments are shown in an identical manner and can thus utilize the same template. In the default view of the comments widget, the two most…
PatrikAkerstrand
  • 45,315
  • 11
  • 79
  • 94
3
votes
1 answer

What is the most idiomatic way to paginate through the results of a search performed using zend_form

I've implemented an action + view that lists all the rows in a database and allows you to paginate through them using zend_paginator. I've also written an action + view that takes a form post (or get), constructs a Solr query and returns a…
Andrew Hancox
  • 2,330
  • 1
  • 20
  • 28
3
votes
1 answer

module specific routes in Zend Framework without specifying module name in route

I need to create some module specific routes, but without explicitly mentioning module name in route. Right now I have separate config file for each module (MODULE/configs/module.ini) and in the module bootstrap I push those routes into Zend…
Bryan
  • 645
  • 1
  • 6
  • 18
3
votes
1 answer

Zend Framework: set Module as Subdomain

I want to create routes to also get links like: my.site.com(/:controller/:action) admin.site.com(/:controller/:action) I tried to add: resources.router.routes.www.type = "Zend_Controller_Router_Route_Hostname" resources.router.routes.www.route =…
Wouter Dorgelo
  • 11,770
  • 11
  • 62
  • 80
3
votes
1 answer

Zend Navigation and Zend Router problem - not finding correct active page

Okay. I'm building a CMS with Zend. It isn't as simple as it looked but still — the best solution for me. I have a tree system with ID and PARENT, PARENT marks under which page the child resides. Anyway. Simple stuff. Every time a page is created or…
Reyo
  • 148
  • 3
  • 11
3
votes
1 answer

Zend Routing:: How I can send all request that going to application-> IndexController to application->module->store->IndexController

How I can send all request in zend project to my default module controller (without use .access files). Now it going to application->IndexController, Instead I need that every request will go to application->module->store->IndexController. I try…
Ben
  • 25,389
  • 34
  • 109
  • 165
3
votes
2 answers

Routing based on standard PHP query string

As you know, Zend Framework (v1.10) uses routing based on slash separated params, ex. [server]/controllerName/actionName/param1/value1/param2/value2/ Queston is: How to force Zend Framework, to retrive action and controller name using standard PHP…
Radek Benkel
  • 8,278
  • 3
  • 32
  • 41
3
votes
1 answer

Zend Hostname Routeur and url helper : losing port

I would like to keep my port number which is different on production and development environment, but calls to the url helper based on my zend routes forget the port number. My routes are a bunch of regexp routes, chaining with default hostname…
Jean-Christophe Meillaud
  • 1,961
  • 1
  • 21
  • 27
3
votes
2 answers

Dynamically change default route parameters in zend framework 2?

I need to change my language application dynamically. I have the folowing route configuration: 'route' => '/[:lang[/:controller[/:action[/:id]]]][[/page/:page]]', 'defaults' => array( 'lang' => 'en', ), Is it possible to change the…
blackbishop
  • 30,945
  • 11
  • 55
  • 76
3
votes
2 answers

How to access route, post, get, server etc parameters from view file in Zend Framework 2

How can we access route, post, get, server parameters from VIEW file in ZF2 way? Here I found the almost same question but no where mentioned about view nor answered anywhere Thanks
Sanju
  • 401
  • 3
  • 7
  • 15
3
votes
2 answers

ZF2 Child Routing issues

I'm having some troubles setting up child_routes. They don't work unless I separate them, althou the end result should be the same!: This is what I'm trying to achieve: 'router' => array( 'routes' => array( 'app' => array( …
MGP
  • 653
  • 1
  • 14
  • 33
2
votes
2 answers

Zend Framework Routing with additional page-param

i have a blog with a routing. In my ini it seems like this: routes.quote.route = :id routes.quote.defaults.module = default routes.quote.defaults.controller = posts routes.quote.defaults.action = single routes.quote.reqs.id = \d+ Now i want to have…
trialgod
  • 302
  • 1
  • 15
2
votes
1 answer

ZendFramework - How to protect confidential files uploaded in public/directory?

Some users uploads there confidential contract/agreement files which is stored in a directory /var/www/html/project/public/contract/. But the problem is from google search or direct link any unauthorized user can open it and…
user285594
2
votes
1 answer

Fixing Zend_Route to work with Zend_Navigation

So i have a Zend_Route in my application like this : public function _initRoutes() { $front = Zend_Controller_Front::getInstance(); $router = $front->getRouter(); $route = new…
phil
  • 137
  • 12
2
votes
2 answers

Zend: The url assembled by the URL view helper is incorrect

I have a problem using my url view helper. I have defined custom routes like so: ; Index routes.domain.type = 'Zend_Controller_Router_Route_Static' routes.domain.route = '/' routes.domain.defaults.controller = index routes.domain.defaults.action =…
eroteev
  • 620
  • 1
  • 7
  • 17
1 2
3
21 22