0

I've started researching tpl files as I've been seeing something in them that I don't recognize, from what I could tell from my research it is just a php file that people renamed for includes but I've noticed there are conditions being used I've never really seen before... like in WHMCS there are conditions like so:

    {if $languagechangeenabled && count($locales) > 1}
        <li>
            <a href="#" class="choose-language" data-toggle="popover" id="languageChooser">
                {$activeLocale.localisedName}
                <b class="caret"></b>
            </a>
            <div id="languageChooserContent" class="hidden">
                <ul>
                    {foreach $locales as $locale}
                        <li>
                            <a href="{$currentpagelinkback}language={$locale.language}">{$locale.localisedName}</a>
                        </li>
                    {/foreach}
                </ul>
            </div>
        </li>
    {/if}

Is there any documentation someone can link me to for this? It's not essential to me as I just do this in php but I'm really curious as it's not just the first time I have noticed it

Is this just another way of doing php without the php? tags?

  • 1
    First you have to look at the PHP that loads it to see which template engine, maybe https://www.smarty.net/docs/en/ – AbraCadaver Mar 17 '20 at 13:53
  • Or for WHMCS https://developers.whmcs.com/themes/smarty/ – AbraCadaver Mar 17 '20 at 13:55
  • @AbraCadaver Oh I see! That makes more sense as when I googled TPL files smarty came up I was starting to think it was just something that came with php. Also just found this https://stackoverflow.com/questions/1808294/what-is-tpl-files-php-web-design –  Mar 17 '20 at 14:05

0 Answers0