Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Templating
#11

[eluser]Unknown[/eluser]
I like this method, but it inexplicably ruins another method that I like. I have a helper called assets_helper that allows me to call all of my css, js, and images from a single top-level directory called (surprise) assets. It's where I keep Twitter Bootstrap and the like for instance. When I use the helper, I can write a style link as such:

Code:
<link rel="stylesheet" href="<? asset_url(); ?>css/house.css">

For some reason, the helper I'm using is now just disappearing.

The code for the helper is as follows:

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if ( ! function_exists('asset_url()')) {

function asset_url() {

  echo base_url().'assets/';

}

}

I would love to employ your method if I could get this part to work. Smile




Theme © iAndrew 2016 - Forum software by © MyBB