We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

generating content using codeigniter instead of EE tags

Development and Programming

petattlebaum's avatar
petattlebaum
60 posts
13 years ago
petattlebaum's avatar petattlebaum

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

       
Bjørn Børresen's avatar
Bjørn Børresen
629 posts
13 years ago
Bjørn Børresen's avatar Bjørn Børresen

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!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.