Want to add pagination and toolbar to my wishlist page on customer panel. Mean that i want to do something like list.phtml on wishlist page in customer account - customer panel.
1 Answer
Override these files in your theme
vendor/magento/module-wishlist/view/frontend/layout/wishlist_index_index.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="customer_account"/>
<body>
<referenceBlock name="customer.wishlist">
<block class="Magento\Theme\Block\Html\Pager" name="wishlist_item_pager"/>
</referenceBlock>
</body>
</page>
Override the view file and add these line where you want to show pagination
/var/www/html/magento246/vendor/magento/module-wishlist/view/frontend/templates/view.phtml
<div class="toolbar wishlist-toolbar"><?= $block->getChildHtml('wishlist_item_pager'); ?></div>