View Single Post
  #4 (permalink)  
Old 04-16-2008, 12:57 PM
lucasm's Avatar
lucasm lucasm is offline
Junior Member
 
Join Date: Mar 2008
Location: Įguas Claras-DF, Brazil
Posts: 17
Cool Two ways...

americanu197,

In your case I see two ways:

1st: put your controllers in the root and say to zf that your controllers are there and use custom routes. For example, when the address begins with mod_, this will be a controller whatever else, it'll be an action. Your site would be like:
  • 10.1.1.10/ <- indexAction in indexController.php
  • 10.1.1.10/about <- aboutAction in indexController.php
  • 10.1.1.10/mod_clients <- indexAction in mod_clientsController.php (*)
  • 10.1.1.10/mod_favorites <- indexAction in mod_favoritesController.php (*)
  • 10.1.1.10/mod_favorites/edit <- editAction in mod_favoritesController.php (*)
(*) you can also set up your route to use the controller's name without mod_

2nd: put all your actions in one controller (index). Your site would be like:
  • 10.1.1.10/ <- indexAction in indexController.php
  • 10.1.1.10/about <- aboutAction in indexController.php
  • 10.1.1.10/clients <- clientAction in indexController.php
  • 10.1.1.10/favorites <- favoritesAction in indexController.php

regards,
__________________
Lucas Mauricio C. e Martins
CR Vasco da Gama, my biggest passion!

Ajude a Combater o Spam! - Help fighting spam!
Reply With Quote