Picking Views doc

Hi all, I'm a noob here, and reading the doc. Just need a clarification about a doc: http://docs.phalconphp.com/en/latest/reference/views.html#picking-views

<?php

class ProductsController extends \Phalcon\Mvc\Controller
{

    public function listAction()
    {
        // Pick "views-dir/products/search" as view to render
        $this->view->pick("products/search");

        // Pick "views-dir/products/list" as view to render
        $this->view->pick(array('products'));

        // Pick "views-dir/products/list" as view to render
        $this->view->pick(array(1 => 'search'));
    }

}

All the comments are refer to "views-dir/products/list". Is this correct?



84.6k

I think it must be:

<?php

class ProductsController extends \Phalcon\Mvc\Controller
{

    public function listAction()
    {
        // Pick "views-dir/products/search" as view to render
        $this->view->pick("products/search");

        // Pick "views-dir/books/list" as view to render
        $this->view->pick(array('books'));

        // Pick "views-dir/products/search" as view to render
        $this->view->pick(array(1 => 'search'));
    }

}


613

Cool. Then it needs a fix.

Thx, mate