简体   繁体   English

如何在WHMCS的name_of_module_ouput函数中包含tpl文件

[英]How to include tpl files in name_of_module_ouput function in WHMCS

Need to know how to include tpl files and assign value to those tpl files.In this example 需要知道如何包含tpl文件并为这些tpl文件分配值。在此示例中

function addonexample_output($vars) {   
    $modulelink = $vars['modulelink'];
    $version = $vars['version'];
    $option1 = $vars['option1'];
    $option2 = $vars['option2'];
    $option3 = $vars['option3'];
    $option4 = $vars['option4'];
    $option5 = $vars['option5'];
    $LANG = $vars['_lang'];

    echo '<p>'.$LANG['intro'].'</p>
<p>'.$LANG['description'].'</p>
<p>'.$LANG['documentation'].'</p>';

}

output is echo, but I need to include tpl files and assign values from _output function. 输出是回声,但我需要包括tpl文件并从_output函数分配值。

Including .tpl files is used as a sentence like this: 包含.tpl文件的用法如下:

{include file="$template/tplfileuneed.tpl" title=$LANG.knowledgebasecategories}

This only works on the template folder. 这仅适用于模板文件夹。

Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM