P
P
Peter2015-08-17 16:51:43
Zend Framework
Peter, 2015-08-17 16:51:43

Where does the "Route with name "" not found" error come from when changing the Template?

I don’t understand the logic of what is happening at all, help)
Routing:

'organizations' => array(
                'type' => 'Literal',
                'options' => array(
                    'route' => '/poi',
                    'defaults' => array(
                        'controller' => 'application.controllers.organizations',
                        'action' => 'index',
                    ),
                ),

Controller
public function indexAction()
    {
...
        $view = new ViewModel(array(
            'data' => $organizations
        ));
        $view->setTemplate('realestate/index');

        return $view;

There are two templates for this section.
When changing $view->setTemplate from ('realestate/one-realestate-index') to ('realestate/index') I get the error "Route with name "" not found".
And here route and a template?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2015-08-17
@Alcospb

Check the template itself (realestate/index). Perhaps somewhere there is something like:

<?= $this->url('') ?>
<!-- или -->
<?= $this->url('/poi/') ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question