Hi Guys, I am creating a basic POST app using phalcon and would appreciate a little help with dispalying static pages. I initially started the project using phalcon devtools so it appears to have enabled vold by default although I cant find where it is enables so can you point me to where it is enabled. I then created a routes.php file under the config folder to point to a PagesController.php under the controllers folder. The PagesController.php file points to an "about page" and a "contact page" very simple. Here is the code:
<?php use Phalcon\Mvc\Controller; class PagesController extends Controller { public function aboutAction() { } public function contactAction() { } }
I have the about.volt file and the contact.volt file within my views folder under a pages folder which the controller loads depending on the url. I would like to organise all my static pages under a folder called pages because i have a lot of them but doing it this way means the URL will be news/pages/about or news/pages/contact. Is there a way to prevent displaying pages in the url, or is there a better way to do this. Thanx Also can you just load a view from the routes.php file for a static page without loading a controller or is this not a good practice. Can someone please tell me what the phtml files for volt are and where and when to use them or is it not really used in phalcon version 3. Any examples would be appreciated. Many Thanks.