[eluser]FinalFrag[/eluser]
Let me start of with a snippet of my view:
Code:
<? if ($this->session->flashdata('message') != '') { ?>
<div id="feedback" class="<?=$this->session->flashdata('class')?>">
<p><?=$this->session->flashdata('message')?></p>
</div>
<? } ?>
What that does is pretty easy. When the 'message' is set in flashdata, it creates a div to show that message.
What I need is this message to show on the first page the visitor visits. So I've made my home controller (the first one the visitor sees when getting to my site). It looks like this:
Code:
class Home extends Controller {
function index() {
// Generate feedback
$this->session->set_flashdata('class', 'notice');
$this->session->set_flashdata('message', 'This website is a <abbr title="Work In Progress">WIP</abbr>.');
redirect('home/showme', 'location');
}
function showme() {
$data['header_pagetitle'] = 'Home';
$data['header_menu'] = ul(array(anchor('', 'Home', array('id' => 'current-tab')), anchor('about', 'About me'), anchor('portfolio', 'Portfolio'), anchor('contact', 'Contact'), anchor('agenda', '_Agenda'), anchor('photos', '_Photos')));
$data['header_title'] = 'Home';
//$data['header_javascript'] = '';
$this->load->view('home', $data);
}
}
What this SHOULD do:
- generate the flashdata and save it in the session
- redirect to mysite.com/home/show
- create all the needed variables in the $data array
- show the home view
It does all that but there's just 1 problem. It shows the home view without a stylesheet

Although, when I take a look at the source of that page it has included my style.css file.
When I try to change the redirect line to: redirect('otherpage', 'location'); it works. So I'm assuming this happens because I redirect to a function in the same controller. Could this be true?
Now you might say: 'just use $this->showme'. I could, but then the flashdata would not be shown on the view (because flashdata only shows on the next request).
Anyone got something on this issue?