In above layout xml file we mention that ‘template=”Webkul_Grid::grid/success.phtml” ‘ that mean Webkul_Grid is module name and grid/success.phtml is path of template file which is in template folder of this module.

3. Now, we will create a template file for display list and pager named success.phtml in app/code/Webkul/Grid/view/frontend/template/grid

4.Now, we have to create the frontend controller file.In Magento2, we need to create separate file for each action of frontend under the Controller folder. file named Index.php in app/code/Webkul/Grid/Controller/Index