We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Tutorials not in line with current version?

I simply cannot follow along in Tutorial 1, as nothing seem to be setup as my freshly created project.

I come from a CodeIgniter background, but is fairly confused about the file structure in the fresly created phalcon project. I see an app/controllers/IndexController, a app/views/index.volt and a app/views/index/index.volt.

I only see the output of the app/views/index/index.volt in the browser.

It's only when I rename the two .volt files, that I can echo out anything from the IndexController. Now, I know that volt is the phalcon template engine. But how do I pass content from the Controller to the View?

I'd basically suggest that 'someone' rewrote the tutorials to match the current version of phalcon. Would make things a lot easier ...

edited Mar '14

Page is composed from hierarchical view layers. Every higher layer should use below methods to render lower layers
Everything is clearly described here https://docs.phalcon.io/en/latest/reference/views.html

in phtml

<?php echo $this->getContent() ?>

in volt

{{ content() }}