[eluser]Braden Schaeffer[/eluser]
Thanks for the quick replies.
@Colin That's what I was thinking... so I looked at the Parser library and it's so easy to implement I can't believe its not an option.
All you have to do is remove/change the line where $template is loaded as a view. I added a parameter called
$is_string so you still have the option of parsing a view file. Here's the edited Parser.php
parse function:
Code:
function parse($template, $data, $return = FALSE, $is_string = TRUE)
{
$CI =& get_instance();
if($is_string == FALSE)
{
$template = $CI->load->view($template, $data, TRUE);
}
if ($template == '')
{
return FALSE;
}
foreach ($data as $key => $val)
{
if (is_array($val))
{
$template = $this->_parse_pair($key, $val, $template);
}
else
{
$template = $this->_parse_single($key, (string)$val, $template);
}
}
if ($return == FALSE)
{
$CI->output->append_output($template);
}
return $template;
}
It's working now, thanks for the suggestion!!!