Passing variables to EE Plugins is pretty straightforward. Problem is, for plugins with more advanced logic, I need upwards of four or five pieces of data from a channel entry. Hard to guarantee that it'll be entered correctly every time.
The alternative I guess is asking for the entry ID and querying for it, but that's kind of redundant, because it's already being queried for, and I'm in a loop, so I'd be adding 10-15 queries per page for data I already have available.
So, inside the {exp:channel:entries} loop, how can I pass the data contained in the current entry to a plugin function?
Thanks
There's no magic answer here Dennis. Just collect the entry data using plugin parameters. If you're worried about missing required parameters, just make sure you check to make sure they've all been passed-in first before trying to perform your plugin logic.
You can return an error message if you like when required params are missing, or use $this->EE->TMPL->log_item();
to show an error message only via the Output Profiler.