Mercurial > defr > drupal > core
comparison themes/engines/phptemplate/phptemplate.engine @ 1:c1f4ac30525a 6.0
Drupal 6.0
| author | Franck Deroche <webmaster@defr.org> |
|---|---|
| date | Tue, 23 Dec 2008 14:28:28 +0100 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 0:5a113a1c4740 | 1:c1f4ac30525a |
|---|---|
| 1 <?php | |
| 2 // $Id: phptemplate.engine,v 1.69 2007/10/02 16:19:23 dries Exp $ | |
| 3 | |
| 4 /** | |
| 5 * @file | |
| 6 * Handles integration of templates written in pure php with the Drupal theme system. | |
| 7 */ | |
| 8 | |
| 9 function phptemplate_init($template) { | |
| 10 $file = dirname($template->filename) .'/template.php'; | |
| 11 if (file_exists($file)) { | |
| 12 include_once "./$file"; | |
| 13 } | |
| 14 } | |
| 15 | |
| 16 /** | |
| 17 * Implementation of hook_theme to tell Drupal what templates the engine | |
| 18 * and the current theme use. The $existing argument will contain hooks | |
| 19 * pre-defined by Drupal so that we can use that information if | |
| 20 * we need to. | |
| 21 */ | |
| 22 function phptemplate_theme($existing, $type, $theme, $path) { | |
| 23 $templates = drupal_find_theme_functions($existing, array('phptemplate', $theme)); | |
| 24 $templates += drupal_find_theme_templates($existing, '.tpl.php', $path); | |
| 25 return $templates; | |
| 26 } | |
| 27 |
