1

I have created plugin for toolbar.php \Magento\Catalog\Block\Product\ProductList\Toolbar

protected function _prepareLayout()
{
    $this->pageConfig->getTitle()->set(__('Category Page'));
    $this->pageConfig->addBodyClass('class'. $this->getCurrentPage() );     
    $this->getLayout()->getBlock('page-title')->setPageTitle('Custom Title');

    return parent::_prepareLayout();
}

On product listing, need to add existing page number in body class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.