Welcome Guest, Not a member yet? Register   Sign In
Problem with HTML helper

Hello, I have a big simple problem with HTML helper.

My problem is include the CSS layout file and images; for example, in views directory there are:

- layout.css
- banner.jpg

in controller I have includes the html helper $this->loader->helper('html'); Ok!
In test.php (views directory) the HTML code is:

<link rel="styleshett" href="css/layout.css" />

But the system engine doesn't include my css file and my images!!!!

Did you help me? Smile

PS. sorry for bad english, but I'm italian Smile

Hi Jbrozz,

did you write it like that?
<link rel="styleshett" href="css/layout.css" />

If so, it's not correct.
Change "styleshett" in "stylesheet"


Wait Jbrozz,

where did you put your css and images folders?
They should not be in the view folder, but in the root (same level as index.php)
Or, if you put them in the view folder, change the relative path accordingly.

Hope it helps.
Quote:Did you help me? Smile

Yes, I did ;-)

Thanks for reply.

Sorry for error, double T is not correct Wink

I put my css folder with images and css style files into /views and into /root, but... nothing! Smile
The result not change!

Help me Sad


for includes my css style, I use:


But the result not change :S

Have a look at the Html code resulting, so you'll see where the page is looking for the files...
If you want, copy/paste the <head> tag so maybe we can help more...

this is my source html code (portfolio.php) in views/

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
&lt;meta http-equiv="Content-type" content="text/html; charset=utf-8" /&gt;
&lt;link rel="stylesheet" href="css/main.css" /&gt;



is a simple HTML page for testing HTML template.

css/main.css is put on /root, where there is index.php.

But doesn't load css styleshet :S

with link_tag(); function the source code is:

&lt;link href="http://localhost/css/main.css" rel="stylesheet" type="text/css" /&gt;

but, nothing...

wait wait...

without the .htaccess file... function! Where is the problem? O_o

Nothing, i have resolve this problem :S

i modify .htaccess file into:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

thanks all Smile

Theme © iAndrew 2016 - Forum software by © MyBB