Yeah, oops.. wasn't thinking back there.. Yes, if this is going to be
used only in views, then a helper is more appropriate.

I also made a mind typo, it's not ~/app/bootstrap.php but ~/app/config/
bootstrap.php

Sorry ;-)

On Jun 5, 3:38 pm, Bob Mattax <[EMAIL PROTECTED]> wrote:
> Is that *really* where this belongs?  Shouldn't this be treated as a
> helper?http://book.cakephp.org/view/98/helpers
>
> On Jun 5, 9:36 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
>
> > Anything you put in your ~/app/bootstrap.php will be available
> > everywhere.
>
> > On Jun 5, 3:17 pm, moment11 <[EMAIL PROTECTED]> wrote:
>
> > > I want a simple function that I can use in all my views:
>
> > >         function export_var($the_var) {
> > >                if (isset($the_var)) {
> > >                  return $the_var;
> > >                } else {
> > >                  return "";
> > >                }
> > >         }
>
> > > I'm not really sure where to put this in the cakephp code such that I
> > > can use it throughout all my views.
>
> > > Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to