diff --git a/docs/languages/en/modules/zend.mvc.quick-start.rst b/docs/languages/en/modules/zend.mvc.quick-start.rst index 31fe81fb2..3656d5b29 100644 --- a/docs/languages/en/modules/zend.mvc.quick-start.rst +++ b/docs/languages/en/modules/zend.mvc.quick-start.rst @@ -251,6 +251,37 @@ That's it. Save the file. .. _zend.mvc.quick-start.create-a-route: +View scripts for module names with subnamespaces +------------------------------------------------ + +As per PSR-0, module should be named following this rule: ``\\(\)*`` +Default controller class to template mapping does not work very well with those: it will remove subnamespace. + +To address that issue new mapping was introduced since 2.3.0. To maintain backwards compatibility that +mapping is not enabled by default. To enable it, you need to add your module namespace to whitelist in your module config: + +.. code-block:: php + :linenos: + + 'view_manager' => array( + // Controller namespace to template map + // or whitelisting for controller FQCN to template mapping + 'controller_map' => array( + '' => true, + ), + ), + +Now, create the directory ``view///hello``. Inside that directory, create a file named ``world.phtml``. +Inside that, paste in the following: + +.. code-block:: php + :linenos: + +

Greetings!

+ +

You said "escapeHtml($message) ?>".

+ + Create a Route -------------- diff --git a/docs/languages/en/modules/zend.mvc.services.rst b/docs/languages/en/modules/zend.mvc.services.rst index 7c33ef064..57e416c41 100644 --- a/docs/languages/en/modules/zend.mvc.services.rst +++ b/docs/languages/en/modules/zend.mvc.services.rst @@ -754,6 +754,11 @@ local configuration file overrides the global configuration. // Default suffix to use when resolving template scripts, if none, 'phtml' is used 'default_template_suffix' => $templateSuffix, // e.g. 'php' + // Controller namespace to template map + // or whitelisting for controller FQCN to template mapping + 'controller_map' => array( + ), + // Layout template name 'layout' => $layoutTemplateName, // e.g. 'layout/layout'