Hi, here is an example:

I have a csv file that contains user information. I want to upload
this file, and import users. For each user record, I want to show if
this user was imported correctly.

In the controller, I have an importusers) method, which takes this csv
file. For each line, I do something like

if (save)
display success msg
else
display error msg

This method (importusers) will render the importusers view, which in
turn will render a view element that show either success or error msg.

I know I can put all success or error msg in an array and pass that
array to the view. But I do not want to do that.

Thanks,

On Oct 29, 5:26 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> $this->renderElement is the correct way to include an element in a
> view, and this will not include any header / footer...
>
> So please provide more details on what you are attempting to do, and
> why it isn't working for you.
>
> On Oct 30, 9:04 am, Steveston <[EMAIL PROTECTED]> wrote:
>
> > I have an element that I want to render repeatedly. As I cannot render
> > elements directly from controller, I have to render this element
> > repeated from a view page. The problem now is that it will produce
> > page header and footer repeatedly as well.
>
> > How can I render an element within a page without repeated header and
> > footer? I am thinking using ob_start and ob_end_flush but I did not go
> > through.
>
> > Thanks,


--~--~---------~--~----~------------~-------~--~----~
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