putting template in phalcon application. (problem)

In this application just tried to create a CSS style to decorate the page.

but when access an action, the style does not work. see in the image errors in the console in the browser

picture in dropbox, click here

This problem also happens when I try to put a twiiter bootstrap template



1.5k
edited Feb '15

can i look at the folder structure?

the css and stuff shld be in public/css



1.5k

Please make sure that it start with slash "/"

Example:

<link rel="stylesheet" type="text/css" href="/css/style.css" />

The slash before css path works if the project is on the web root of the web server. I used to have the same issue before adopting the Phalcon tags.

For phtm file use <?php echo Phalcon\Tag::stylesheetLink('css/style.css'); ?>

If your base uri is correct in config this will work globally.

edited Feb '15

hello guys! I put the "/", and it worked. thank you

but before i have only one file "/public/css/style.css". now i try one template of twitter bootstrap. and the new problem is in JavaScript files.

I put two pictures, browser with console and sublime text with estructure of files.

files estructure

Browser

as I said, even using the bootstrap thema the problem only appears when the access actions