I've researched about the Front Controller pattern. I'm convinced I'm going to use that pattern for an upcoming project. I have no code written yet, but, how do I use presentation logic for my websites? What if I want to display certain information when the user is logged in and when the user has certain rights? What if a certain form needs data from the database in order to work? (For the latter I was thinking to call the corresponding controller with AJAX and loading the data this way but I don't know if there's a more efficient way) This leaves me a bit confusing, and I want to avoid if possible to use frameworks like Smarty or CakePHP. Thank you beforehand.
EDIT: I was thinking about using a template controller class, this is, a class whose responsability would be to load certain webpages and display them, called from the front controller. My main issue is with loading data from the database when the template page gets called. What if there's a form that needs data from the database? Do I have to rely on AJAX to load the data, or is there a way to tell a template to load data while keeping the layers separated?