I have defined 2 custom routes. One for threads/:id/:name and the other for threads/tags/:tagName however the second one conflicts with the first because if I enable both then the first breaks and treats :id literally as an action, not obeying the \d+ requirement ( I also tried using pure regex routes, see bottom ).
Action "1" does n...
Hello,
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:
<?xml version="1.0"?>
<configdata>
<routes>
<Home route=":locale/">
<defaults controller="index" action="i...
With the Zend Framework, I am trying to build routes for a REST api on resources organized in the following pattern:
http://example.org/users/
http://example.org/users/234
http://example.org/users/234/items
http://example.org/users/234/items/34
How do I set up this with Zend_Rest_Route?
Here is how I have setup the route for the use...
Hi,
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 routes, mainly for multilanguage over a multidomain configuration (short overview below...
Hello there,
I'm having some difficulties with the combination of Zend_Navigation, Zend_Translate and the routing needed.
My site navigation is done through Zend_Navigation based on and XML file.
I've now added translation to the site based on Zend_Translate and added to following change of routing to the bootstrap:
protected function...
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 query string, in this case:
[server]?controller=controllerName&action=actionName¶m...
Here is an example of what i want to do
The Url will be as follow
http://www.example.com/en/us/directory/companies/view/4433225.html
Where is
en: is the lang
us: is the country
directory: is the module
companies: is the controller
view: is the action
4433225.html: is sort of parameter send to the action could be the company name like th...
I have the following problem with Zend Framework.
My project has several controllers like Video,Category and Post.
The VideoController has an Action called categorylist, so the default URL/Route becomes /video/categorylist
Since the action requires 3 parameters I whant to add one simple route:
$router->addRoute(
'categorylist...
Hello everyone,
I am doing my first Zend Applicaition and I am finally done with the coding side.
But the problem which I have is Client has asked to rewrite the Url's which follows the SEO and as I don't have much knowledge of the Zend Router,I am finding myself helpless this time.
Please helo me out.The current Url which I have is...
...
Hi ,
Trying to grab the params after ?. I need them to add to the Zend_Paginator.
ex: http://www.example.com/test/show?name=xxx&age=20&sex=m
Building a paginator for search results.
Is there any solution for that ?
$router = new Zend_Controller_Router_Route_Regex(
'test/show\?(.*)',
array(
...
I'm using the Zend Router and so things like (/ and /index.php) or (/about and /index.php/about) ends up as the same here.
However, /index.php/whatever should not exist as it is the exactly same resource as /whatever so it doesn't make a sense the duplication.
How do I avoid this?
Even http://zendframework.com/manual/en/zend.controlle...
<routes>
<www type="Zend_Controller_Router_Route_Hostname">
<route>www.domain.com</route>
<chains>
<index type="Zend_Controller_Router_Route">
<route></route>
<defaults module="default" controller="index" action="index" />
</index>
<community>
...
Hi,
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 this:
public function indexAction()
{
$this->_forward('index','index','store')...
I need to convert string like this:
$url = 'module/controller/action/param1/param1value/paramX/paramXvalue';
to url regarding current router (including translation and so on).
Usually I generate the target urls using url view helper, but for this I need to specify all params, so I would need to manually explode the string. I tried to...
This is how my route looks like:
acc_long.type = Zend_Controller_Router_Route_Regex
acc_long.route = "@accommodation/([A-Za-z-]+)/([0-9A-Za-z-]+)-([0-9]+)"
acc_long.map.1 = 'location'
acc_long.map.2 = 'name'
acc_long.map.3 = 'id'
acc_long.defaults.controller = "accommodation"
acc_long.defaults.action = "index"
acc_long.default...
I have a form that I am trying to set the action for. I want to declare the action inside my form file (which extends Zend_Form) instead of in a controller or view, using a route I have created in my bootstrap.
Usually when I want to use a route I do something like
$this->url(array(), 'route-name');
in the view, or
$this->_helper->ur...
Zend framework i have directory tree as following with robots.txt file, but when i browse www.site.com/robots.txt , it says page not found error. How do i tell ZF that robots.txt is allowed?
A. Directory tree:
wwwsite/application
wwwsite/library
wwwsite/ZendFramework-1.10.7.tar.gz
wwwsite/public
.
|--- captcha
|
|--- css
|--- js
|---...
Hi,
How can i setup a route that points to URL of a partner website?
Example:
<a href="<?php echo $this->url(array(), 'superPartnerRoute'); ?>">Try this ultra fab partner website</a>
Reason for this; the URL is quite complicated and used around the website i'm working on.
http://slippery.slick.domain.com/very/long/url/index.asp?vie...
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 sorted Nav & Routes are regenerated.
I'll copy the whole Admin_Pages_Model code for cre...
Hi All,
Hopefully someone can help me out here.
I have a Zend Router that handles adding stuff to the basket. Now i'm building a customiser module, so the user can add as many parts, in different colors, on specified sections of the product.
My basic url is like this
http://www.domain.com/shop/add/custom/size/type
My current router...