Your explanation is valid, it's just Phalcon's documentation led me to believe the render function takes one argument being 'folder/view' instead of 2.
Sorry but my directory structure is unclear. I have a views folder. Inside the views folder is an index.volt file and a directory called test. Inside the test directory is an index.volt file. I know the render function can find test/index.volt because a file with similar contents shows up in the app/cache directory, but it still displays views/index.volt which is strange behavior. And yes, I have Volt setup in my services file.
Sorry for taking up your time, but this is a problem which is halting progress on my project.
You have to supply both of those because render()
doesn't know what view file you're talking about when you just provide 'index'. Volt works on the concept of [folder name]/[view template file] - so you need to provide both of those.
As to your second problem - have you set up Volt in your bootstrap file? What directory did you say all your template files were in? I'm guessing you said '/views'. By default, if Volt can't find the template file you specify, it tries to find the index file for the directory you specified. If it can't find that, it tries to display the base index file. Since there is no '/views/test' directory, or a '/views/test/index.volt' file, it just displayed '/views/index.volt'. Try moving the 'test' directory inside '/views'.