I would like change the html from CampaignTrackingLatestOpensWidget

Hotaviano Melo

New Member
Hi everyone,

I would like change it in my theme, the original html is here:
apps/customer/components/web/widgets/campaign-tracking/views

Regards,
Hotaviano Melo
 
@Hotaviano Melo -
if you look in /apps/customer/views/campaigns/overview.php you'll see calls like:
PHP:
$this->widget('customer.components.web.widgets.campaign-tracking.CampaignTrackingLatestClickedLinksWidget', array(
    'campaign' => $campaign
));
$this->widget('customer.components.web.widgets.campaign-tracking.CampaignTrackingLatestOpensWidget', array(
    'campaign' => $campaign
));
$this->widget('customer.components.web.widgets.campaign-tracking.CampaignTrackingTopClickedLinksWidget', array(
    'campaign' => $campaign
));
$this->widget('customer.components.web.widgets.campaign-tracking.CampaignTrackingSubstribersWithMostOpensWidget', array(
    'campaign' => $campaign
));
which means you can override this view file and load your own widgets inside, which in turn can be modified accordingly to your needs.
.
So, you would create a /views/campaigns/overview.php in your theme and paste the contents of /apps/customer/views/campaigns/overview.php in it.
Then, you'll copy the folder 'apps/customer/components/web/widgets/campaign-tracking in your inside your theme, at components/web/widgets/campaign-tracking and you'll edit the view files as you see fit.
Next, in your /views/campaigns/overview.php instead of calling:
PHP:
$this->widget('customer.components.web.widgets.campaign-tracking.CampaignTrackingSubstribersWithMostOpensWidget', array(
    'campaign' => $campaign
));
You'll call:
PHP:
$this->widget('theme-your-theme-name.components.web.widgets.campaign-tracking.CampaignTrackingSubstribersWithMostOpensWidget', array(
    'campaign' => $campaign
));
Basically the path: "customer.components.web.widgets.campaign-tracking." becomes "theme-your-theme-name.components.web.widgets.campaign-tracking" since you reference classes from your own theme.

And that should do it.
Hope it helps.
 
@Hotaviano Melo -
if you look in /apps/customer/views/campaigns/overview.php you'll see calls like:
PHP:
$this->widget('customer.components.web.widgets.campaign-tracking.CampaignTrackingLatestClickedLinksWidget', array(
    'campaign' => $campaign
));
$this->widget('customer.components.web.widgets.campaign-tracking.CampaignTrackingLatestOpensWidget', array(
    'campaign' => $campaign
));
$this->widget('customer.components.web.widgets.campaign-tracking.CampaignTrackingTopClickedLinksWidget', array(
    'campaign' => $campaign
));
$this->widget('customer.components.web.widgets.campaign-tracking.CampaignTrackingSubstribersWithMostOpensWidget', array(
    'campaign' => $campaign
));
which means you can override this view file and load your own widgets inside, which in turn can be modified accordingly to your needs.
.
So, you would create a /views/campaigns/overview.php in your theme and paste the contents of /apps/customer/views/campaigns/overview.php in it.
Then, you'll copy the folder 'apps/customer/components/web/widgets/campaign-tracking in your inside your theme, at components/web/widgets/campaign-tracking and you'll edit the view files as you see fit.
Next, in your /views/campaigns/overview.php instead of calling:
PHP:
$this->widget('customer.components.web.widgets.campaign-tracking.CampaignTrackingSubstribersWithMostOpensWidget', array(
    'campaign' => $campaign
));
You'll call:
PHP:
$this->widget('theme-your-theme-name.components.web.widgets.campaign-tracking.CampaignTrackingSubstribersWithMostOpensWidget', array(
    'campaign' => $campaign
));
Basically the path: "customer.components.web.widgets.campaign-tracking." becomes "theme-your-theme-name.components.web.widgets.campaign-tracking" since you reference classes from your own theme.

And that should do it.
Hope it helps.
It worked as well, thank you so much :D
 
Back
Top