Created
January 15, 2014 14:11
-
-
Save nessthehero/8436935 to your computer and use it in GitHub Desktop.
Drupal template.php file
This file contains hidden or 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 | |
/** | |
* Include our template.whatever.php files | |
*/ | |
$theme_path = drupal_get_path('theme', 'your_theme'); | |
// Specify the path to our template.php files | |
// I decided that my template.php files will | |
// reside in a folder named "php" | |
$filePath = "$theme_path/php"; | |
// Open the directory | |
$dir = opendir($filePath); | |
while ($file = readdir($dir)) { | |
// require all files that end with a .php extension. | |
if (preg_match('/\.php/',$file)) { | |
require_once "$theme_path/php/$file"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment