I got it to work with by making it a helper

and calling it in my view


On Feb 17, 7:56 am, arron <[email protected]> wrote:
> Thank you for your advice, I will try that.
>
> I would still like to know if I made a custom function how would i
> call it in the view
>
> echo $this->Getback   ?
>
> and how do i use function variables within other functions?
>
> I understand for example i have to edit a record i would do
>
> public function edit($id = null) {
>
> I guess I'm just confused
>
> On Feb 16, 5:33 pm, jeremyharris <[email protected]> wrote:
>
>
>
>
>
>
>
> > Well, just think of how the function will be used. In CakePHP, you can
> > split things up into components, helpers and behaviors as well. CakePHP is
> > just PHP so you can technically put the function anywhere. If you put it in
> > your AppController all of your controllers will have access to it. If you
> > put it in a Component then controllers with that component have access to
> > it. If you need it in your view, maybe it belongs in a Helper?
>
> > Really you want to just place things where they logically belong. From what
> > you wrote, it sounds like it has to do with the response which would belong
> > in the controller or as a component.

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to