|
|||
|
Hi
I've been looking at the recent Zend_Layout webinar (Zend_Layout and Zend _View Enhancements Webinar). Not sure if I'm missing something, but I'm confused about the paths used. All of the paths use the name of the view script rather than the action. For example, http://layouttest.localhost/demo/ajaxy-autocomplete/ works instead of http://layouttest.localhost/demo/ajaxyAutocomplete/ (on my local server), where the view script is ajaxy-autocomplete.tpl and there is a DemoController::ajaxyAutocompleteAction method. The documentation seems to suggest that it would work the other way round (also the way I would have expected): "Zend_Layout uses Zend_Filter_Inflector to establish a filter chain for translating a layout name to a layout script path. By default, it uses the rules 'CamelCaseToDash' followed by 'StringToLower', and the suffix 'phtml' to transform the name to a path." Could anyone explain what is going on? Many thanks... |
|
|||
|
I've found the reason why this is happening, but it doesn't really help
![]() By the time Zend_Controller_Action::dispatch is called, if the path is formatted as 'player-random' the action is 'playerRandomAction', but if the path is 'playerRandom' the action is 'playerrandomAction' which doesn't exist. It looks like the inflector acts on the path in the opposite way I expected (?). So, as far as I can tell, that is how it is supposed to work. The path should be formatted as 'player-random' and that is converted to 'playerRandomAction'. If anyone else has a better understanding, please let me know. Thanks. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|