Tuesday, August 23, 2011

Re: Plugin Elements

I have one more question that cropped up after Tilen's help.

In my plugin, I would like to various actions with in the plugin's
main controller (user_agent_app_controller). Is this even possible?

On Aug 23, 4:33 am, Tilen Majerle <tilen.maje...@gmail.com> wrote:
> if you are on cake <= 2.0.0-dev than you use like you say, if you are on
> cake >= 2.0.0-alpha, then, do this
>
> $this->element('elementname', array('variablenameforelement' => 'value',
> 'second' => 'value2, array('plugin' => 'plugin_name'));
>
> so first parameter is element name
> second are vars for element
> third are element vars (cache, plugin, etc)
>
> --
> Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> 2011/8/23 Jeremy Rottman <rottm...@gmail.com>
>
>
>
>
>
>
>
> > I am working on a new plugin and I have a few questions about using
> > elements with plugins.
>
> > To give a basic example of my plugin, I have 3 different controllers
> > in my plugin: ControllerA, ControllerB, ControllerC. The elements I am
> > creating for each controller is simply a quick view of the data.
>
> > In the plugin controller I have a method/view called landing, from
> > with in this landing.ctp file I need to call in the plugin elements.
>
> > So my first question, is this best practice with using plugins?
> > My second question, how would I do this? I have read the overview of
> > elements with plugins but it doesn't explain much.
> > My assumption is something like this:
> > <?php echo $this->element('element_name', array('plugin' =>
> > 'pluginname')); ?>
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: