开发者

Drupal template inclusion in WHMCS?

开发者 https://www.devze.com 2023-01-07 16:48 出处:网络
I\'ve got a Drupal site, and WHMCS (www.whmcs.com) site. I am busy integrating the two. I was wondering if there would be a way to call a function that would return the drupal template (processed) so

I've got a Drupal site, and WHMCS (www.whmcs.com) site. I am busy integrating the two. I was wondering if there would be a way to call a function that would return the drupal template (processed) so that I can only provide the $content variable with my own variable. Effectively, this will allow me to integrate my WHMCS template with my Drupal template so that any chang开发者_开发问答es made in the Drupal template, reflects on my WHMCS installation.

WHMCS uses the Smarty Template Engine. In other words, you can:

Include code like this:

{php} print 'hello'; {/php}

Work with the header.tpl and footer.tpl pages ( which mean the ideal would be a drupal function that returns everything BEFORE print $content, and another function that returns everything AFTER print $content).

Anyone got some pointers or suggestions? Or should I not even think of going this route?


Drupal can use other template engines than phptemplate. Smarty if one the the template systems that has been used with Drupal, so why don't you use that instead. Seems like it will make things easier for your to keep things consistent.

You can download the Drupal smarty template engine at d.o.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号