[eluser]Matthieu Fauveau[/eluser]
Hi vinexar,
You are in luck 'cause I'm in an helping mood (while I wait for someone to pick me up, but that's another story).
The asset helper is only returning the HTML string. When you call : css_asset('css/style.css'), it will return the HTML link tag. You need to get that in your $data array to display it into your view.
In a nutshell :
Controller
Code:
function index()
{
$data['css_asset'] = css_asset('css/style.css');
$data['message'] = 'This is for the html body sent from controller';
$this->load->view('hello_view',$data);
}
View
Code:
<html>
<head>
<title>Title</title>
<?php echo (isset($css_asset)) ? $css_asset : '' ?>
</head>
<body>
<h1>This is Body Title with External CSS placed in assets</h1>
<?php echo “Hello, this is made with php “,$message ?>
</body>
</html>