Skip to content

Instantly share code, notes, and snippets.

@whatnickcodes
Created December 19, 2012 02:47
Show Gist options
  • Save whatnickcodes/4333948 to your computer and use it in GitHub Desktop.
Save whatnickcodes/4333948 to your computer and use it in GitHub Desktop.
updated slice for awesomeness
foreach ($this->slice as $key => $value)
{
if (is_array($value))
{
foreach ($value as $k => $v)
{
$this->data[$k] = $this->CI->load->view('slices/'.$v, $this->data, TRUE)."\n";
}
}
elseif (!is_numeric($key))
{
$this->data[$key] = $this->CI->load->view('slices/'.$value, $this->data, TRUE)."\n";
}
else
{
$this->data[$value] = $this->CI->load->view('slices/'.$value, $this->data, TRUE)."\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment