Advertisement

10.16.2007 at 07:47PM PDT, ID: 22897992 | Points: 500
[x]
Attachment Details

Zend Framework Routing Issue

Tags: zend, framework, routing
I am attempting to create a modular web application using the Zend Framework and am having a tremendous amount of problems figuring out the routing components. Ideally, I want to have a setup so that I can have content published with URL's such as:

http://www.site.com/aboutus.html
http://www.site.com/projects/projecta/overview.html

In both the above examples, no module, controller, or action is specified in the URL. In the second example, the projects and projecta portions are merely containers or virtual folders used to organize content. I'm trying to find a way to have URL's like this forward to a CMS / Page module & controller. At the same time, I want the standard routes :module/:controller/:action/:params work for other modules.

I've read through the online manual, as well tried to follow additional tutorials and samples in various blogs, articles, etc. Nothing seems to work.

Ideally, I'd also like to implement a multi-lingual feature where a URL such as:

http://www.site.com/en/aboutus.html
http://www.site.com/en/projects/projecta/overview.html

will specify the users language preference (assuming that the content is available in that language). I've tried setting this up with something like :lang/:module/:controller/:action, but if the :lang parameter is left out, than is simple takes the module portion as the lang param and so on.

It seems that the URL's I am looking for are possible, but I'm just unable to figure out how to do it. From what I can figure out, it seems I need a custom router class, but my attempts at this have failed as well.

If anyone can help point me in the right direction and get me to the point where I can understand what I need to do, that would be great. I'm fairly new to the Zend Framework, so I just need some help making sense of the router component.

Sean
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: savetheorcas
Question Asked On: 10.16.2007
Participating Experts: 1
Points: 500
Views: 0
Translate:
Loading Advertisement...
10.18.2007 at 01:10AM PDT, ID: 20099303

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
10.19.2007 at 05:59PM PDT, ID: 20113370

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_1_20070628