I'm just starting with plugins and I've downloaded the Business Logic plugin and am trying to call it from my template.
Here's the code in my template:
{% extends "_layout" %}
{% block content %}
{{craft()->businessLogic->exampleService()}}
{% endblock %}
And the code in the BusinessLogicService.php:
class BusinessLogicService extends BaseApplicationComponent
{
/**
* This function can literally be anything you want.
*
* HOW TO USE IT
* From any other plugin file, call it like this:
*
* craft()->businessLogic->exampleService()
*
*/
public function exampleService()
{
return "I've got your data right here!";
}
}
It returns this error:
Unknown "craft" function.
Would I call it a different way?
Thanks for any help with this.