Custom View as a Default View Set in Custom Module

Hello ,
I need to change default view (list view) to custom view ,

Please suggest me how to set default view as custom view in custom module… .

Thanks
Rahul Gupta

If your custom view is a classic view just copy it to custom/modules//index.php and it will be the default (index) view for that module.

If it is not a classic view, create a custom/modules//views/view.list.php that displays your view if action=index and the ListView if action=ListView.

1 Like

Hello,
There is another way to do that:
In your custom module folder, create a file named action_remap.php

In that file, add the following:


<?php
$action_remap['index'] = 'YOUR_VIEW_NAME';
1 Like