Welcome Guest, Not a member yet? Register   Sign In
Odd issue - stylesheet being ignored sometimes
#1

[eluser]ZeroLag[/eluser]
Forgive me if this doesn't turn out to be 100% CI related.

My stylesheet is being ignored on all pages except for the main page in my application.
I am calling a template from my controllers that basically sets the page layout and takes content as a variable sent from the controller as well.

View template:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Title Here&lt;/title&gt;
&lt;meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'&gt;
&lt;link href="public/admin/css/admin_style.css" rel="stylesheet" type="text/css"&gt;
&lt;/head&gt;
&lt;body bgcolor='#E2E1E1'&gt;
<div id='container'>
<div id='searchwindow'>
    <div class='colheader'>Search</div>
    <div style='padding: 2px;'>
            &lt;form name='searchform' action='quicksearch.php' method='GET'&gt;
                &lt;input type='text' name='searchstring' value="&lt;?= $string ?&gt;"&gt;
                &lt;input type='submit' value='Search'&gt;
            &lt;/form&gt;        
    </div>
</div>
    <div id='contentwindow'>
        &lt;!-- Content --&gt;
        &lt;? echo $content; ?&gt;
        &lt;!-- End Content --&gt;
    <div>  
</div> &lt;!-- end container --&gt;
&lt;/body&gt;
&lt;/html&gt;

The function calling this view looks like this:
Code:
&lt;?php
class Home extends Controller {
    
    function Home()
    {
         parent::Controller();
        
         //Protects account controller
         $this->freakauth_light->check('admin');

        //Loads the model and database for this whole controller
        $this->load->model('candidates');
        $this->load->model('contacts');
        $this->load->model('clients');
        $this->load->database();
        $this->load->helper(array('html_date_select', 'proficiency', 'child_age'));
                
        //Enable profiling on this controller?
        //$this->output->enable_profiler(true);
    }
    
    function index()
    {
        $this->view();
    }
    
    function view()
    {
        $data['username'] = $this->db_session->userdata('user_name');
        $data['string']   = "test";
        
        //Get the lists of all the recently added records
        $data['newestCandidates'] = $this->candidates->getRecentlyAddedCandidates();
        $data['newestContacts']   = $this->contacts->getRecentlyAddedContacts();
        $data['newestClients']    = $this->clients->getRecentlyAddedClients();
        
        //Get the lists of all the most recently modified records
        $data['recentlyUpdatedCandidates'] = $this->candidates->getRecentlyUpdatedCandidates();
        $data['recentlyUpdatedContacts']   = $this->contacts->getRecentlyUpdatedContacts();
        $data['recentlyUpdatedClients']    = $this->clients->getRecentlyUpdatedClients();
        
        //Get the list of most recently uploaded files
        $data['recentlyUploadedFiles'] = $this->candidates->getRecentlyUploadedFiles();
        
        //Load the view
        $data['content'] = $this->load->view('admin/home', $data, true);
        $this->load->view('admin/shared/main_template', $data);
        
    }
}
?&gt;

In any other controller I use, even if I simply copy/paste the view function the template is called and the page will load, but the stylesheet information is completely ignored. I know this is the case because if I comment out the &lt;link rel="stylesheet"&gt; tag and reload my "correctly working" controller, it looks just like all the controllers that don't work.

I don't really understand how this is possible. They all call the exact same view, and I have confirmed that everything is exactly the same by looking at the page sources in my browser. All I can conclude is that the CSS is being ignored on all pages except one.

Can anyone help?
Thanks,
Steve


Messages In This Thread
Odd issue - stylesheet being ignored sometimes - by El Forum - 11-25-2009, 11:30 AM
Odd issue - stylesheet being ignored sometimes - by El Forum - 11-25-2009, 11:35 AM
Odd issue - stylesheet being ignored sometimes - by El Forum - 11-25-2009, 06:31 PM
Odd issue - stylesheet being ignored sometimes - by El Forum - 11-25-2009, 06:48 PM
Odd issue - stylesheet being ignored sometimes - by El Forum - 11-25-2009, 07:02 PM
Odd issue - stylesheet being ignored sometimes - by El Forum - 11-25-2009, 07:57 PM
Odd issue - stylesheet being ignored sometimes - by El Forum - 11-26-2009, 12:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB