![]() |
$this->template->display ... what does that means?? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: $this->template->display ... what does that means?? (/showthread.php?tid=16536) Pages:
1
2
|
$this->template->display ... what does that means?? - El Forum - 03-09-2009 [eluser]il_dandi[/eluser] I've tring to know an example that I've found ... linkster in many pages I see $this->template-> what does that mean?? I found it in this function function edit($id) { $this->template->metas('title', 'Administration Backend :: Categories :: Edit'); $this->load->helper('form'); $data['category'] = $this->listings->get_category($id); if ( ! $this->_validate_form( $data['category']->name ) ) { $this->template->display('admin/categories/edit', $data); } else { $this->listings->update_category($id); $this->session->set_flashdata('msg', 'Category Updated'); redirect('admin/categories'); } } and in this function: function Categories() { parent::MY_Admin(); // Load required classes $this->load->model('listings_model', 'listings'); $this->load->library('validation'); // Template Settings $this->template->metas('title', 'Administration Backend :: Categories'); } Can you help me to know how (and where) to use "template" Thanks $this->template->display ... what does that means?? - El Forum - 03-09-2009 [eluser]TheFuzzy0ne[/eluser] http://ellislab.com/codeigniter/user-guide/libraries/parser.html $this->template->display ... what does that means?? - El Forum - 03-09-2009 [eluser]pistolPete[/eluser] [quote author="TheFuzzy0ne" date="1236656427"]http://ellislab.com/codeigniter/user-guide/libraries/parser.html[/quote] I don't think so, because the library you mentioned is called parser rather than template I'd say they used the Template Library written by Colin Williams: - http://ellislab.com/forums/viewthread/88452/ - http://www.williamsconcepts.com/ci/codeigniter/libraries/template/ $this->template->display ... what does that means?? - El Forum - 03-09-2009 [eluser]TheFuzzy0ne[/eluser] I agree. Apologies. It crossed my mind as I hit the "Submit Post" button, but I just thought "Naaaah!". Note to self: be more thorough! $this->template->display ... what does that means?? - El Forum - 03-10-2009 [eluser]il_dandi[/eluser] I've read your reply!! I don't know this code > $data['categories'] = $this->listings->get_all_categories(); > $this->template->display('listings/categories', $data); this displays the categories .... what I don't know is where to display!! display('listings/categories', $data); where can I find the file that diplay datas?? Thanks $this->template->display ... what does that means?? - El Forum - 03-10-2009 [eluser]TheFuzzy0ne[/eluser] ./system/application/views/listings/categories.php $this->template->display ... what does that means?? - El Forum - 03-13-2009 [eluser]il_dandi[/eluser] Thanks for help me!! I've new application I've created the view, now in my controller I've inserted $this->template->display('admin/avatars_view', $data); But I see A PHP Error was encountered Severity: Notice Message: Undefined property: Avatars::$template Filename: admin/avatars.php Line Number: 15 What do I've to do for manage templates? Thanks $this->template->display ... what does that means?? - El Forum - 03-13-2009 [eluser]pistolPete[/eluser] Did you download and install the above library? Did you load the library? Read the userguide: - http://ellislab.com/codeigniter/user-guide/general/creating_libraries.html - http://ellislab.com/codeigniter/user-guide/libraries/loader.html $this->template->display ... what does that means?? - El Forum - 03-13-2009 [eluser]il_dandi[/eluser] I copyed the template.php in libraries folder I see Fatal error: Call to undefined function to_entities() in /Applications/MAMP/htdocs/life/system/application/views/template.php on line 14 where in my template file I have <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?=to_entities($site_name.' | '.$title)?></title> <meta name="Description" content="<?=to_entities($meta_description)?>" /> <meta name="Keywords" content="<?=to_entities($meta_keywords)?>" /> thanks $this->template->display ... what does that means?? - El Forum - 03-13-2009 [eluser]il_dandi[/eluser] If I use the view template.php that I've found in your link (and not the template.php view that I've in my linkster example) I see this: tal error: Call to undefined method CI_Template::metas() in /Applications/MAMP/htdocs/app/system/application/controllers/admin/test.php on line 20 Thanks |