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

possible to fetch total_results in a plugin that asks for the channel short_name as a parameter?

Development and Programming

Brad K Morse's avatar
Brad K Morse
178 posts
14 years ago
Brad K Morse's avatar Brad K Morse

Looking to create a plugin and I need capture the total_results of a channel.

This would be how the plugin would be used in a template:

{exp:plugin_name channel_short_name="news"} 
  //stuff that goes in here
{/exp:plugin_name}

I want to know if there is any functions in the API that allow me to fetch the total_results of a channel, I probably would need to pass the status to it as well.

If there is a page that has a list of data I can fetch that includes that, it would be helpful.

Thanks.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
14 years ago
Mark Bowen's avatar Mark Bowen

Hiya,

I personally don’t know if there is any API for what you are after here although the way I’d do it is just utilise a simple database query to get at what you need here.

Is it just literally just the total_results for a single Channel you are after here as I could swear there was one of these on devot-ee.com somewhere. Sorry but couldn’t find the link whilst posting this.

Mark

       

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.