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

Why view filenames are not camelCase

I have action in controller:

public function addAvatarAction()

and volt file must be: addavatar.volt, it's not working with addAvatar.volt. Is it possible to change this issue? CamelCase is more readable.



85.5k

can u sneak a _ somehow, call the action add_avatar, then you controller sohuld be addAvatarAction, and your volt file addAvatar.volt

I am not sure if it will work, and i am going to bed :-)

Cheers

can u sneak a _ somehow, call the action add_avatar, then you controller sohuld be addAvatarAction, and your volt file addAvatar.volt

I am not sure if it will work, and i am going to bed :-)

Cheers

I'm not sure what You mean, could You show an example?



85.5k

https://example.com/users/controllerName/add_avatar,

in this case you have to have action AddAvatarAction in this controller.

so i think the volt file should be named addAvatar.volt aswell

https://example.com/users/controllerName/add_avatar,

in this case you have to have action AddAvatarAction in this controller.

so i think the volt file should be named addAvatar.volt aswell

I have such action (public function addAvatarAction()) and Phalcon looks for addavatar.volt, not addAvatar.volt.



85.5k

but make the url : add_avatar not addAvatar