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

Plugin Construct Function

Development and Programming

Rowan Gray's avatar
Rowan Gray
3 posts
12 years ago
Rowan Gray's avatar Rowan Gray

When using a plugin multiple times in one template, using different function within the plugin, i.e.

{exp:my_plugin:my_function_01} {exp:my_plugin:my_function_02} {exp:my_plugin:my_function_03}

Is the my_plugin construct function called multiple times, or just once for all three occasions.

I’m making a database query in the plugin and I’d rather only make the query once rather than three times.

my alternative would be to use tagdata i.e

{exp:my_plugin:my_function} {my_var_01} {my_var_02} {my_var_03} {/exp:my_plugin:my_function}

but I’d rather not do this as I prefer the former method

       

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.