cakephpcakephp-2.4

cakephp theme not loading on live server


site url http://mathsmitra.in/

Theme directory location

app\View\Themed\Default

appcontroller.php

public $view   = 'Themed';
public $theme = 'Default';

cakephp version 2.4.6

img,css and js not loading in my site and site perfectly working on local server. How to resolve.


Solution

  • I checked console there is 404 error message... You have to adjust rights(permissions).

    when I started to substitute with for example

    THIS

    <link rel="stylesheet" type="text/css" href="/theme/Default/css/font-awesome.min.css">
    

    WITH THIS

    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    

    works as desired... this way you can make it work or just set proper rights

    If this doesn't work, try to put css files inside webroot/css/ directory and from page call:

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