We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

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

edited Feb '15

can i look at the folder structure?

the css and stuff shld be in public/css


Please make sure that it start with slash "/"


<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


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