how to load data in layouts/private?

Hello ... I am developing an application and have problem ...

I have a menu table in the database and I need to load the data dynamically into layouts/private, , but I want to load in all views that use private

how I can do this? and what is the best way?

edited Apr '15

1. You can Load through the session object where you set variables containing your data.

2. You can have an Autoloaded Model carrying your data which you will always call in any controller action where you are setting your layout/private view


I understand the session, but I know nothing of automatic loading models ... He had planned to create a component that receives as a parameter the user role for the allowed access.

if you have some example of autoloader models .. please