Created
June 5, 2015 18:47
-
-
Save woombo/254e0a6f188236fccd7f to your computer and use it in GitHub Desktop.
Drupal Features: Allow custom view templates to be placed within feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_views_api_alter(). | |
* Alter the list of modules/themes which implement a views api. | |
*/ | |
function MODULE_views_api_alter(&$list) { | |
// Alter the path of the views implementation. | |
if (isset($list['MODULE'])) { | |
$path = drupal_get_path('module', 'MODULE'); | |
$list['MODULE']['path'] = $path; | |
$list['MODULE']['template path'] = $path . '/assets/views'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment