Hello,
I've been trying to understand certain things around Phalcon for a website I'm building.
Whereas the general notion of MVC is clear, and I understand how routing, controllers and ORM models work,
I'm puzzled by views.
I did manage to create my index.phtml under app/views/ which I want to be shown in every single page.
Now my register view and controller is shown hierarchicaly:
- first the indexstuff, then theregisterform.
Here's where im puzzled/stuck:
If registration fails, I catch the error in function public signupAction inside class RegisterController.
I was intending to use the flash mechanism, but want to know:
- can I format the output of the view displaying /register/fail
- can I format the output of the view displaying register/success
ATM, I flash those messages, and if I want them formated, my only option seems to write actual html inside the flash message.
I know that the hierarchy for views exists, I just don't get it. Where should the view for those scenarios be? What should it be named? How would it catch the message and display it (inside the view)?