What you probably want to do is write a component and handle your
logging in the startup function.

You probably also want to be using the component to inform the
controller as to layout / views to use for the skinning. Depending on
your controllers, there are all sorts of ways you could do this,
ranging from $controller->layout = 'skin' in component startup to a
beforeRender filter.

To get access to the db tables in your component, you'll have to use
loadModel to grab instances for the logging and prefs etc.

Pages controller is something totally different. It is a simple
controller to just display views from the /app/views/pages directory
without the hastle of creating actions. Essentially it is for static
content. However, it could be informed by your component to change the
layout (skin) around static content and to log user progress if you
add your component to AppController in /app/app_controller.php.

Hope that helps.

Simon

On Nov 2, 12:30 pm, Cristian Vrabie <[EMAIL PROTECTED]> wrote:
> hi everybody,
> i'm new to phpcake organization model and i'm having some problems
> integrating some classes. maybe you can give me a hand.
>
> i need a "visitor" class that will be responsible with tracking a site
> 'visitor' (not a user), keep a track and use his settings (like language
> and skin preferences) via cookies and similar stuff. the thing with this
> is: i don't know if this should be a controller or a component. i would
> say it's a controller because it hase it's own models (like log tables,
> preferences table, etc), but then, it has no view and must be called
> (initialized) on every page before everything else, and be accesible
> from any other controller.
>
> what should i do? i saw a page_controller somewhere and i think i can
> use that but i'm not sure how?
>
> what do you sugest. i'm sure this is a preaty common practice. what do
> you use?
>
> thanks,
> Cristian


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to