|
|||
|
Hello,
I am quite new to the Zend Framework so I apologize in advance if I figured/assume things wrong ![]() I work for a SEO company and they want me to use URLs with the following format: Quote:
Quote:
However, the normal routing still has to work (i.e.: Quote:
Therefore, I did the following routing in my bootstrap: PHP Code:
What would be the best way to do this ? I want this to be global and dont want to do the same thing in all my controllers... thats why i want to do it in bootstrap. 1) What is the best way to do this? 2) Is there any better solution you guys would have to suggest? 3) In my route, is there a way to add an optional module param ? i.e: :lang/:module/:controller/:action ... See if the module exists, otherwise, it is considered as a controller, and controller is considered like the action THX A LOT IN ADVANCE ![]() Last edited by sysk : 04-11-2008 at 03:27 PM. |
|
|||
|
Quote:
In an Action() function: PHP Code:
|
|
||||
|
Make a controller plugin that Registers the lang param in the registry or go ahead and declare a global. You should really examine your design before you go making globals tho. General rule of thumb is to not make globals unless they really really really need to be globals.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|