Hi,

I'm quite new to working with Cake and I'm pretty sure that I'm asking
something obvious - so I'm sorry for that in advance. In my defence,
I've tried checking the manual, API, searching on here etc. and
haven't found the answer to my question (or maybe not understood the
answer to my question!).

I'm going to have a login box on every page of my site which will form
part of the site header / mast head.

If the user is not logged in it will display the login box, and if
they are it'll display some member-only type functions (e.g. edit
profile, logout etc.).

I'm not quite sure how to go about that in Cake - in terms of where to
define my various pieces of code. Obviously the login processing stuff
belongs in a user controller, but other than that?

I'm thinking that my login box is what Cake terms an 'element' - I've
only come across these used in views; can they also be used in a
layout (is there are significant difference between layouts and
views)?

Assuming that's right, where do I check to see if the user is logged
in or out - is it "appropriate" (i.e. best practice) to put that logic
in the layout? That seems to make sense to me since it's only deciding
which display element to use?

Thanks in advance for putting up with my questions.

Damien


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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