diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/themes/engines/phptemplate/phptemplate.engine	Tue Dec 23 14:28:28 2008 +0100
@@ -0,0 +1,27 @@
+<?php
+// $Id: phptemplate.engine,v 1.69 2007/10/02 16:19:23 dries Exp $
+
+/**
+ * @file
+ * Handles integration of templates written in pure php with the Drupal theme system.
+ */
+
+function phptemplate_init($template) {
+  $file = dirname($template->filename) .'/template.php';
+  if (file_exists($file)) {
+    include_once "./$file";
+  }
+}
+
+/**
+ * Implementation of hook_theme to tell Drupal what templates the engine
+ * and the current theme use. The $existing argument will contain hooks
+ * pre-defined by Drupal so that we can use that information if
+ * we need to.
+ */
+function phptemplate_theme($existing, $type, $theme, $path) {
+  $templates = drupal_find_theme_functions($existing, array('phptemplate', $theme));
+  $templates += drupal_find_theme_templates($existing, '.tpl.php', $path);
+  return $templates;
+}
+