views:

45

answers:

3

Hello,

I want to make a kind of alias for my modules: Is there a way to make

Or do I have to make a route for every single action I make in this module? If I don't make a route my links will look like:

http://www.example.com/news/news/show and http://www.example.com/news/news/show.

P.s i'm using Zend 1.10.6

Thanx in advance!

A: 

You will have to define a route for each URL you want routed in a non-standard way.

Daniel Egeberg
That is not the answer i hoped to hear off..... :( But thanx anyway!
atjepatatje
A: 

Hi

I guess it will be something like that:

$route = new Zend_Controller_Router_Route(
'news',
array('module' => 'news', 'controller' => 'news', 'action' => 'index'));
$router->addRoute('news', $route);

where first arg 'news' for Zend_Controller_Router_Route is the url http://www.example.com/news that will route to http://www.example.com/news/news/index

salu2

returnvoid
Thank you, but that was exactly my problem, i don't want news/news/index in my url.... i'd prever news/index. The only way to achive that is adding a route for every page, like Daniel explained.
atjepatatje
A: 

In your config file you must enable modules by putting this in your config file

resources.modules[] = 

And it should by default route correctly in your application.

markem