0
votes

I need a simple help with cakephp. It may be a problem regarding routes but I couldn't figure out how to solve this problem.

I've put all my css files in webroot/css in my app. In my default layout, I just put a html link <link href="css/bootstrap.min.css" rel="stylesheet"> . It works with my url localhost/items (index function), but it doesn't work when I do localhost/items/view/2 (view function). How can I solve this problem?

3

3 Answers

0
votes

Use the HtmlHelper to generate links to assets in webroot as shown in manual.

0
votes

Why don't you use the HTML Helper like :

echo $this->Html->css('bootstrap.min');
0
votes
echo $this->Html->css('/assets/css/bootstrap.min');