Unmöglich Vorlage zf2
Habe ich erstellt neues Modul namens "Währung" und konfiguriert Strecken im Modul.config. Es ist in Ordnung.
Danach habe ich neue controller genannt CrateController für Wechselkurse.Und auch erstellt, Formen, Modellen und view-Dateien.
Aber Es ist keine Route richtig.
Fehler:
Fatal error: Uncaught exception 'Zend\View\Exception\RuntimeException' with message 'Zend\View\Renderer\PhpRenderer::render: Unable to render template "Währung/Kiste/index"; resolver konnte nicht aufgelöst werden in eine Datei....
Keine Ahnung, check this out hilfreich sein wird.
Mein Modul.config-Datei wie folgt.
return array(
'controllers' => array(
'invokables' => array(
'Currency\Controller\Currency' => 'Currency\Controller\CurrencyController',
'Currency\Controller\Crate' => 'Currency\Controller\CrateController',
),
),
//The following section is new and should be added to your file
'router' => array(
'routes' => array(
'currency' => array(
'type' => 'segment',
'options' => array(
'route' => '/currency[/:action][/:currency_id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'currency_id' => '[0-9]+',
),
'defaults' => array(
'controller' => 'Currency\Controller\Currency',
'action' => 'index',
),
),
),
'crate' => array(
'type' => 'segment',
'options' => array(
'route' => '/crate[/:action][/:c_rate_id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'c_rate_id' => '[0-9]+',
),
'defaults' => array(
'controller' => 'Currency\Controller\Crate',
'action' => 'index',
),
),
),
),
),
InformationsquelleAutor cha | 2012-10-22
Du musst angemeldet sein, um einen Kommentar abzugeben.
Check für zwei Dinge:
Ersten: Ist die template-Datei vorhanden?
./module/Currency/view/currency/crate/index.phtml
Zweiten: Überprüfen Sie den folgenden Eintrag in
./Currency/config/module.config.php
InformationsquelleAutor Sam