Writing my first plugin. Scaffolded with Generator and is active (appearing in admin). This is where most tutorials leave you on your own so hoping to get some help calling a simple function in my templates.
In pluginname/src/Plugin.php I have the following function:
class Plugin extends BasePlugin
{
public function hello() {
return "Hello World";
}
}
Template:
{{ pluginname.hello }}
Craft is not recognizing 'pluginname' as a variable so the function will not run. I'm obviously missing a critical concept here and hoping someone can point me in the right direction. Thanks.