$this->template->display ... what does that means?? |
[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
[eluser]TheFuzzy0ne[/eluser]
http://ellislab.com/codeigniter/user-gui...arser.html
[eluser]pistolPete[/eluser]
[quote author="TheFuzzy0ne" date="1236656427"]http://ellislab.com/codeigniter/user-gui...arser.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/codei.../template/
[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!
[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
[eluser]TheFuzzy0ne[/eluser]
./system/application/views/listings/categories.php
[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
[eluser]pistolPete[/eluser]
Did you download and install the above library? Did you load the library? Read the userguide: - http://ellislab.com/codeigniter/user-gui...aries.html - http://ellislab.com/codeigniter/user-gui...oader.html
[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
[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 |
Welcome Guest, Not a member yet? Register Sign In |