sherif.abousamra95
New Member
how to remove list name from the browser tab when someone unsubscribes?
<?php
hooks()->addAction('frontend_controller_lists_before_render', function() {
if (controller()->getAction()->getId() === 'unsubscribe') {
controller()->setData([
'pageMetaTitle' => 'Your title',
]);
}
});
thank you
it works with this tag [UNSUBSCRIBE_LINK]
but it doesn't work with this tag [DIRECT_UNSUBSCRIBE_LINK]
do you know how to make it work in the other tag also?
hooks()->addAction('frontend_controller_lists_before_render', function () {
if (controller()->getAction()->getId() === 'unsubscribe' || controller()->getAction()->getId() === 'unsubscribe_confirm') {
controller()->setData([
'pageMetaTitle' => 'Your title',
]);
}
});
Thank you so much, it workedYou need to add and unsubscribe_confirm because direct unsubscribe link redirect to another page.
PHP:hooks()->addAction('frontend_controller_lists_before_render', function () { if (controller()->getAction()->getId() === 'unsubscribe' || controller()->getAction()->getId() === 'unsubscribe_confirm') { controller()->setData([ 'pageMetaTitle' => 'Your title', ]); } });