title: How to change the basePath in Zend Framework 2 for a module
body: <p><strong>Note-</strong> First, Read the question carefully.</p>
  
  <p>I am new  in ZF2. Right now i am working on zend framework 2.3. I have three module in this project and i am working on Wamp.</p>
  
  <ol>
  <li>Application -----------  // Default ZF2 Page.</li>
  <li>Album      ------------// ZF2 Tutorial Example</li>
  <li>Html       ------------// I have Created</li>
  </ol>
  
  <p>I have created a custom layout for Html module (last one). But there is a issue of basePath. I am not getting the right page path in this module. so i change in Html/config/module.config.php   and add following script in module.config.php</p>
  
  <pre><code> 'view_manager' =&gt; array(
       'base_path' =&gt; 'zend/public/htmlmodule/',
       'template_path_stack' =&gt; array(
       'html' =&gt; __DIR__ . '/../view',
      ),
  ),
  </code></pre>
  
  <p>Now, i am getting the right basepath for this module. But now basepath automatically change for two other module such as album and application. Now i deleted the above code and add this code in <code>zend\config\autoload\local.php</code></p>
  
  <pre><code>view_manager' =&gt; array(
      'base_path' =&gt; 'zend/public/htmlmodule/',
      'template_path_stack' =&gt; array(
      'html' =&gt; __DIR__ . '/../view',
      ),
  ),
  </code></pre>
  
  <p>Now this script had change path for all module.</p>
  
  <p>Now, My question is, i want change a basepath for a particular module and layout(optional), not for all module and want different basepath for differ module. Actually without right basepath, you will not get the right image/css and js file.</p>
  
  <p>Here I am sharing my module.config.php file for all 2 module.</p>
  
  <pre><code>&lt;?php
  
  //Album Module &gt; module.config.php
  
  return array(
  'controllers' =&gt; array(
      'invokables' =&gt; array(
          'Album\Controller\Album' =&gt; 'Album\Controller\AlbumController',
      ),
  ),
  
  'router' =&gt; array(
      'routes' =&gt; array(
          'album' =&gt; array(
              'type'    =&gt; 'segment',
              'options' =&gt; array(
                  'route'    =&gt; '/album[/][:action][/:id]',
                  'constraints' =&gt; array(
                      'action' =&gt; '[a-zA-Z][a-zA-Z0-9_-]*',
                      'id'     =&gt; '[0-9]+',
                  ),
                  'defaults' =&gt; array(
                      'controller' =&gt; 'Album\Controller\Album',
                      'action'     =&gt; 'index',
                  ),
              ),
          ),
      ),
  ),
  
  'view_manager' =&gt; array(
     'base_path' =&gt; 'zend/public/album',
     'template_path_stack' =&gt; array(
         'album' =&gt; __DIR__ . '/../view',
          ),
       ),
   );
  </code></pre>
  
  <p>and HTML Module's <code>module.config.php</code> is:</p>
  
  <pre><code>&lt;?php
  return array(
      'controllers' =&gt; array(
          'invokables' =&gt; array(
              'Html\Controller\Html' =&gt; 'Html\Controller\HtmlController',
           ),
       ),
       'module_layouts' =&gt; array(
       'Application' =&gt; 'layout/layout.phtml',
       'Html' =&gt; 'layout/custom.phtml',
   ),
  
   'router' =&gt; array(
       'routes' =&gt; array(
           'html' =&gt; array(
               'type'    =&gt; 'segment',
               'options' =&gt; array(
                   'route'    =&gt; '/html[/][:action][/:id]',
                   'constraints' =&gt; array(
                       'action' =&gt; '[a-zA-Z][a-zA-Z0-9_-]*',
                       'id'     =&gt; '[0-9]+',
                   ),
                   'defaults' =&gt; array(
                       'controller' =&gt; 'Html\Controller\Html',
                       'action'     =&gt; 'index',
                   ),
               ),
           ),
       ),
   ),
  
  'view_manager' =&gt; array(
      'base_path' =&gt; 'zend/public/htmlmodule/',
      'template_path_stack' =&gt; array(
          'html' =&gt; __DIR__ . '/../view',
           ),
       ),  
  );
  </code></pre>
  
  <p>I want know, Where am i doing wrong and how i will get the right base path according module.</p>
  
  <p>Thanks to all in advance for contribution in this question.</p>