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

Accessing a channel entry

Development and Programming

akrug23's avatar
akrug23
30 posts
14 years ago
akrug23's avatar akrug23

I am trying to write module that displays entries from a channel. I have not been able to find a function that does this. There is an Channel API only has Update, Delete, Submit, etc but no fetch. I am just wanting to be able to be able to display all the entries from one channel and be able to order on different fields.

I know that I could use the SQL function with Codeigniter. But I know that channel data, fields, etc are spread over several tables.

Does anyone have any suggestions?

Thanks Aaron

       
the3mus1can's avatar
the3mus1can
426 posts
14 years ago
the3mus1can's avatar the3mus1can

Your module class can extend the Channel Module class. Then just implement your own entries method to implement the extra functionality you want and then call: $return_data = parent::entries();.

You will need to require the Channel module’s class file with require_once APPPATH.”modules/channel/mod.channel.php”;.

Inside your entries method you can use the $this->EE->TMPL->tagparams array to pass data to the parent’s entries method. For example, $this->EE->TMPL->tagparams[‘orderby’] = ‘some field name here’;.

       

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.