You can place constants in bootstrap.php, though I usually create a
site-specific config file and include it within bootstrap.php

In config file:
Configure::write('MyConstant', 'My Value');

In view file:
Configure::read('MyConstant'); // My Value



On 5 June 2014 13:06, vbpupil <[email protected]> wrote:

> How best can I add constants to my cake application to be used in my views?
>
>
> for example, I have differnt paths for different types of images ie;
> internal images, external images
>
> I have read many comments on bootstrap, use it/dont us it?? so where would
> be best and cleanest to use it?
>
>
> please provide an example if you can.
>
> Many thanks
>
>
>
>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Kind Regards
 Stephen Speakman

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Reply via email to