Jump to content

WHMCS Newibe Questions about tld files and templates

Philip C

Recommended Posts

I just came from the world of whm autopilot... I have to say this is a nice change, I have problems getting that thing even setup correctly.


anyways, I have WHMCS installed and just about setup... I cannot get my mind wrapped around the idea of the tld templates. The code that tied in my main reseller website to autopilot was html code.


I need someone to help me out with understanding that to do with the tld templates.....



I'm not new to this, I just don't understand it..


Thanks for your help...



Link to comment
Share on other sites

You can mostly use plain HTML in the TPL files, as long as you're careful with the Smarty tags. These look like {if} and {literal}, all inside curly braces. Just like HTML or PHP, most tags have opening "{if}" and closing "{/if}" tags. If you're at all familiar with PHP, it works nearly the same as that language.


You can wrap your design around these without messing them up fairly easily, only needing to actually fool with these tags if you want to change functionality of your installation of WHMCS. Specific question, please ask, otherwise, have you looked at the manual?


Link to comment
Share on other sites

Ok, maybe this will help a bit. Create a new template set to be used with your new design:

I copied the default template directory in the distribution with another name, but in the same place within the site. Then I edited the template "header.tpl" in that new set to include a few files right at the very top of the template that had my site design's top "half" in it. I included these files like this:

{php} include('inc_header.php'); {/php} {php} include('inc_nav.php'); {/php}

Placing the PHP tags inside {curly braces} cause Smarty to treat them like regular PHP includes. This will "import" those two files into the top of the header template file when it's called in the browser.

You can do the same for the footer, if you want to include some sort of navigation or something there. As before, create a file (inc_footer.php or whatever name you like) and call it with an include:

{php} include('inc_footer.php'); {/php}


Be careful with links, since they will be relative to wherever the page loads (usually within the install directory for WHMCS), and images, if used, need to have correct paths as well.

If you wanted to, you could just use plain HTML in the same TPL files to wrap your design around the WHMCS code. Simply add your code to the header and footer directly, instead of using the PHP include method.


That should at least get you started.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated