I've been working on my first EE plugin today, and I need to make it dynamic by passing either a PHP variable, or I would have thought I can use a preload_replace variable, from the template that calls the plugin, into the plugin.
The plugin runs a custom query on the database to return a set of entry IDs into the channel entries tag. But I need to set a category ID in the the template that would be dynamic depending on the template been viewed. This needs to be passed into the plugin for the query to run.
How can I pass this in?
I've tried numerous ways with the template class, and using PHP by setting a variable in the template, but no success. I just keep getting an undefined variable error.
Can anyone offer any pointers, please?