Change views template path from theme folder to module

function {{modulename}}_theme($existing, $type, $theme, $path) {
  return array (
    'views_view__{{viewsname}}__block' => array (
      'variables' => array('view' => NULL,),
      'template' => 'views-view--{{viewsname}}--block' ,
      'base hook' => 'views_view',
      'path' => drupal_get_path('module', '{{modulename}}'). '/templates',
    ),
  );
}
Help Share this Article