Welcome Guest, Not a member yet? Register   Sign In
Placing Assets Q
#3

[eluser]Thorpe Obazee[/eluser]
You can place them anywhere but personally I just create folders(css/images/js) on the root folder. then I use this helper:

Code:
<?php
/*
* @author        Thorpe Obazee
* @since        Version 1.1
* @license         BSD
*/

if ( ! function_exists('add_stylesheet'))
{
    function add_stylesheet($stylesheets = array())
    {
        if ( ! is_array($stylesheets))
        {
            $stylesheets = array($stylesheets);
        }

        foreach ($stylesheets as $key => $val)
        {
            html_stylesheet($key, $val);
        }
    }
}

if ( ! function_exists('html_stylesheet'))
{
    function html_stylesheet($src, $media)
    {
        echo "<link rel=\"stylesheet\" href=\"".base_url()."$src\" media = \"$media\" type=\"text/css\" />";
    }
}

To use:

Code:
<?php add_stylesheet(array('media/css/styles.css' => 'screen')); ?>


Messages In This Thread
Placing Assets Q - by El Forum - 04-25-2009, 09:21 PM
Placing Assets Q - by El Forum - 04-26-2009, 08:27 PM
Placing Assets Q - by El Forum - 04-26-2009, 09:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB