Hi,
I'm trying to implement a simple login box to my web application, just a regular username and password field if no session is detected and a welcome message if there is one, i started with the following:
I thought a simple element will do the job, but i realized than i can't include css or js(not inline) from an element because the $scripts_for_layout would be already sent to the output buffer.
I'm now thinking of implementing it as a component, not sure if this would be the right architecture(is it?) but i can definitely add the js/css and output them in the head tag from there. The question is now where should i place the markup for the login box, an element or view maybe, and how do i inject them to the view? a simple $this->set('x', htmlmarkup) in the component and another echo in the view. What's right way to do it.
Thanks. Yehia