Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • To add image in the cakePHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 501
    Comment on it

    We can add the new image in cakePHP just like we did html.

    but we have different tag for it.

    We need html helper that is already provided by the cakePHP but have to be included first.

    For adding an image

    echo $this->html->image(imagename, array('alt'=>'image'));

    Similarily including css can be as easy as the image.

    It will assume that the css in the webroot folder.

    echo $this->Html->css('forms');

    We can also include the css file form any loaded plugin.

    To include app/Plugin/DebugKit/webroot/css/toolbar.css

    echo $this->Html->css('DebugKit.toolbar.css');

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: