I'm relatively new to ExpressionEngine, and apologise if this seems obtuse!
I have channel entries with a lot of fields associated with them (each channel entry will typically have 20+ channel fields), and I wanted to know if there was a way to pass all those fields to my plugin somehow by just sending through the entire entry itself as a parameter?
Currently, I'm trying to avoid something like this:
{exp:channel:entries channel="my_news" limit="10"}
{exp:my_plugin:process_something field1="" field2="" field3="" ... field40=""}
{/exp:channel:entries}
Is there an easy and efficient way to send through all those field values to my plugin? Or alternatively, get the entry itself in the plugin and just pass the entry ID as the parameter, something like:
{exp:channel:entries channel="my_news" limit="10"}
{exp:my_plugin:process_something entry_id="{entry_id}"}
{/exp:channel:entries}
...and then in the plugin:
public function process_something()
{
$entry_id = ee()->TMPL->fetch_param('entry_id');
$entry = < some function / method to get the entry and its details > ;
}
Is there something to make this possible? I hope this makes sense, and thank you for any help!