Hello,
I know the answer for my issue is RTFM. I’m just looking for a starting point.
I have some content (catalog-like data) where I believe the best way to call the data is using loops as opposed to EE tags.
I have already successfully used codeigniter code for email templates. But I’m stumped on how to use ci for ee templates. I know/hope I’m missing something really simple. Do I need more that the library and helper lines below to get started?
I’ve tried combining echo code along with ci ee $query = $this->db->query(“…”) but have gotten errors. Surprise, I know.
Any documentation links would be appreciated too.
$this->EE->load->library('session');
/**
* Load the Text Helper
*/
$this->EE->load->helper('text');Thanks!
Peter T
Hi Peter,
I’d create an addon instead of PHP code directly in the template. Also, in general, you need to use $this->EE to access the global CI object, so your db query above should be $this->EE->db->query();
You can use http://pkg.io to generate a skeleton of your module. Just select “Module” on that page and then edit mod.yourmodule.php to include the functions you need. Functions in that file = EE tags that can be used in your templates.
Introductions to addon development can be found here: http://ellislab.com/expressionengine/user-guide/development/module_tutorial.html
.. and someone recently launched this website which seems like a good starting point: http://ee-recipes.com/
Good luck!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.