Welcome Guest, Not a member yet? Register   Sign In
Using CSS in CodeIgniter MVC
#3

[eluser]wr5aw[/eluser]
[quote author="rey_philip_regis" date="1225320741"]so what I did is:
<link type="text/css" rel="stylesheet" href="<?php echo $_SERVER['DOCUMENT_ROOT'].'code_igniter/system/css/default.css'; ?>" />[/quote]
I setup my app with a config item for the css folder then pass it to the view and do this:
Code:
<link type="text/css" rel="stylesheet" href="<?php echo $css_path; ?>default.css"; ?> />
I do the same for images, pd files, etc. Makes for a very portable app.

My config vars for the views looks like this:
Code:
$config = array (
  'page_settings' =>
  array (
    'image_path' => site_url()."/images/",
    'css_path' => site_url()."/css/",
    'pdf_path' => site_url()."/pdf/",
  ),
  ... etc.


Messages In This Thread
Using CSS in CodeIgniter MVC - by El Forum - 10-29-2008, 11:52 AM
Using CSS in CodeIgniter MVC - by El Forum - 10-29-2008, 12:23 PM
Using CSS in CodeIgniter MVC - by El Forum - 10-29-2008, 12:53 PM
Using CSS in CodeIgniter MVC - by El Forum - 10-29-2008, 02:10 PM
Using CSS in CodeIgniter MVC - by El Forum - 10-29-2008, 03:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB