Are you using a Smarty library which was designed to work with CodeIgniter, or just trying to get them to work together yourself? Generally, the output of a template library is going to have be passed to CI's Output class or the library will need to use a display_override hook to bypass CI's output.