philsturgeon / codeigniter-template

Template library for CodeIgniter which supports modules, themes, partial views, etc.
411 stars 178 forks source link

set not working(?) #49

Closed Cipa closed 10 years ago

Cipa commented 10 years ago

Hi, In this code the set and the second param in build are not working for me

$this->template
            ->title('Blog', 'xxx')
            ->set('table', 'table')
            ->set_partial('top-bar', 'partials/top-bar')
            ->build('home',  array('message' => 'Hi there!'));

a var dump for the above returns

array(4) { ["title"]=> string(10) "Blog | xxx" ["breadcrumbs"]=> array(0) { } ["metadata"]=> string(0) "" ["partials"]=> array(0) { } } 

So message and table values are not being set. The rest seems to work fine.

Thank you

Cipa commented 10 years ago

So it turns out a variable $table is available in the view. I thought everything is inside $template