This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

deroccha
deroccha

I just try to setup some basic plugin to get the air of OctoberCMS.

I've been creating my desired structure via cli and I have my Plugin entry

 public function registerComponents()
    {
        return [
            'Fefe\Reports\Components\Campaigns'   => 'campaignsTable'
        ];
    } 

than


 -- components
 --- Campaigns
 ---- default.htm
 --- Campaigns.php

I init in Campaigns.php my Component


public function onRun() {
        $this->owner = $this->user->login;
    }

than I try to output in the selected Page

{% component 'campaignsTable' %}
which should call the default.htm. Here I try to echo the owner variable as it follows

{{ __SELF__.owner }}'s Campaigns

but the default.htm doesn't seems to exists for my Plugin If I output directly in Page

{{ campaignsTable.owner }}'s Campaigns

works Why default.htm is not called in my case, what I'm doing wrong?

Last updated

deroccha
deroccha

Diggin a bit deeper it seems the problem comes if I use construct in my Component class.

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.