如何使用智能语法查找正在引用的模板



我目前有以下代码是用Smarty模板编写的,我有点不确定如何处理语法:

    <div class="member_actions">{component ProfileActions profile_id=$actorId}</div>       
    {if $owner_mode && $componentManage}
        {component $profile_component_select}
    {/if}

我知道这里创建了一个div,在这个div中,他们添加了一个名为"profileActions"的组件;然而,我确实有一个名为"components"的文件夹,还有一个称为"ProfileActions"的样式表,但它是空的。我有点不确定这到底是从哪里来的。我不知道如何编辑这个样式表。有人能告诉我密码是怎么写的吗?

您在这里看到的:

{component ...}

component是自定义的Smarty函数。您可以在Smarty插件目录中找到它,也可以在为您的项目保留所有功能(如果有的话)的文件中找到它。

如果你想找到结尾,只需在整个网站目录中搜索以下内容:

smarty_function_component

无论如何都必须找到它,因为这是注册自定义Smarty函数的唯一方法。

编辑1:

如果使用registerPlugin方法动态注册插件:

$smarty->registerPlugin("function","component", ...)

那么你必须搜索以下内容:

registerPlugin("function","component"

registerPlugin(" function ", " component "

相关内容

最新更新