tags:

views:

57

answers:

2

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 changes 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?

A: 

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.

googletorp
But that still doesnt explain how I will integrate the two. Or are you saying I must then rather look for hook points in WHMCS, that calls WHMCS's headers. I'd prefer to do it the other way. I much rather use Drupal's template engine than stupid smarty.
RD
A: 

I second your thought @RD. I'm looking for such integration myself. If this is something you could spend some time on, I'll appreciate working with you with you.

drecute
I do have a solution already. Send me a mail: [email protected], if you want to hear how I did it.
RD

related questions