Use elements and pass in variables:
echo $this->element('element_name', array('variable_name' => $variable));
Inside the element you can refer to $variable_name.
And don't forget that $variable can itself be an array, so you can pass in
multiple values.
Jeremy Burns
Class Outfit
[email protected]
http://www.classoutfit.com
On 7 Sep 2010, at 14:10, yehiasalam wrote:
> Hi,
>
> During the project development we noticed that we are repeating a few
> dialogs (confirm delete, login dialog, etc) and duplicating the same
> code in the view (<div class="hidden"...), they are basically the same
> dialogs except for a few parameters (confirm button link, login
> redirection path).
>
> So the question how to make the dialogs reusable, plugins seems like
> an overkill, and view helpers makes more sense for simpler markups, or
> maybe i'm wrong, what do you think?
>
> Regards.
> Yehia A.Salam
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" 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
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" 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