【问题标题】:Calling Phpfox::getBlock into template file in PHPFOX在 PHPFOX 中将 Phpfox::getBlock 调用到模板文件中
【发布时间】:2014-09-25 09:09:43
【问题描述】:

今天我试图将 Phpfox::getBlock 调用到 PHPfox 中的模板文件中,但它不起作用。请看看哪里有问题。

想添加一个 php 块

core.template-copyright

进入文件

register.html.php

我试着像这样添加

{Phpfox::getBlock('core.template-copyright')}

但它对我不起作用,即使在 admincp 模板编辑器中文件 (register.html.php) 颜色变为红色,这意味着代码中有问题。

【问题讨论】:

    标签: php html phpfox


    【解决方案1】:
    you can call phpfox block in template file by using following syntax
    
    {module name='core.template-copyright'}
    
    {module name='module-name.block-name'}
    
    or if you want to add only html file in to template then you should write
    
    {template file='user.block.register.step2'}
    

    【讨论】:

      猜你喜欢
      • 2012-12-31
      • 1970-01-01
      • 2016-08-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-09
      • 1970-01-01
      • 2012-02-03
      相关资源
      最近更新 更多