DrupalBin
Submit Code
About
Recent Posts
Fix for Code
5 hours 45 min
ago
Fix for Code
5 hours 45 min
ago
Code
5 hours 50 min
ago
whole thing
6 hours 42 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
call template file, pass variables
View
Download
Fix
August 5, 2008 - 11:41pm — Anonymous
<?php
$text
= theme
(
'apply_template'
,
$data
)
;
return
$text
;
function
theme_apply_template
(
$data
)
{
ob_start
(
)
;
include
path_to_theme
(
)
.
'/my-block.tpl.php'
;
$buffer
=
ob_get_contents
(
)
;
ob_end_clean
(
)
;
return
$buffer
;
}
?>
block
template
theme