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

get channel entries in plugin

Development and Programming

w33b's avatar
w33b
1 posts
15 years ago
w33b's avatar w33b

I’m trying to write a plugin that consolidates entries from channels and external sources and then sorts them depending on date, but stumbling at the first hurdle. Is there an easy way to get a channel’s entries within a plugin?

       
Rick Jolly's avatar
Rick Jolly
729 posts
15 years ago
Rick Jolly's avatar Rick Jolly

I’d like to know the best answer as well.

The channel entries api doesn’t have a method to get entries. The EE model “channel_entries_model.php” has one method to get all entry ids, and another to get an entry from an id, but there is no support for all the parameters that you have available with the channel entries tag within a template. The best way I found was to learn from Rob Sanchez’s json plugin:

http://devot-ee.com/add-ons/json/

What he does within his plugin is instantiate the Channel library and capture its output. You could do the same.

       

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.