Making a plugin.
I can't seem to get this {% set leads = craft.lead_infopack.getPacks() %}
to fire from within a template.
Plugin name: lead
Here's a look inside my variables class.
Lead_InfopackVariable.php:
class Lead_InfopackVariable
{
public function getPacks()
{
return craft()->lead_infopack->leads();
}
The leads function calls a service that outputs all entries within my 'infopack' table.
If I write it like this it works {% set leads = craft.lead.getPacks() %}
LeadVariable.php:
class LeadVariable
{
public function getPacks()
{
return craft()->lead_infopack->leads();
}
}
{% set leads = craft.lead.infopack.getPacks() %}
{% set leads = craft.lead.infopack.getPacks() %}
.