ZF-Commons / ZfcTwig

Zend Framework 2 Module that provides a Twig rendering strategy
BSD 3-Clause "New" or "Revised" License
96 stars 55 forks source link

Trying to config per README.md, and get There are no registered paths for namespace "__main__" #30

Closed Saeven closed 12 years ago

Saeven commented 12 years ago

Module config in pertinent spot reads:

'view_manager' => array(

 'template_path_stack'      => array(
        'application'          => __DIR__ . '/../views',
    ),
    'template_map' => array(
        'layouts/layout'    => __DIR__ . '/../views/layouts/layout.twig',
        'index/index'          => __DIR__ . '/../views/application/index/index.twig',
    ),
 ),

'zfctwig' => array(
    'namespaces' => array(
        'application'     => __DIR__ . '/../views/application',
    ),
),

Have tried every permutation and combination I can think of..

Thanks for any guidance you can offer.

Rovak commented 12 years ago

I think your configuration conflicts with the suffix_locked option which is default true. You can try to change the suffix_locked to false, or append the .twig extension to your layouts/layout and index/index.

Saeven commented 12 years ago

Rovak did some magic.

Loading composer repositories with package information Updating dependencies

Then, ignore the README.md presently on site if it differs from what lies below at the config level:

 /**
   * Twig
   */
  'zfctwig' => array(
      'namespaces' => array(
          'application'     => __DIR__ . '/../view',
      ),
  ),

/**
 * ViewManager
 */    
'view_manager' => array(
    'display_not_found_reason'   => true,
    'display_exceptions'         => true,
    'doctype'                    => 'HTML5',        
    'layout'                     => 'layout',

    //'exception_template'       => '@theme/error/index.twig',
    // 'not_found_template'      => '@theme/error/404.twig',

    'template_path_stack' => array(
        __DIR__ . '/../view',
    ),
),

YMMV