ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# addons 插件检测 ## 插件检测标签 用于检测插件是否安装 > HkCms\_v2.2.1.20220603版本起 ## 参数 参数名称可选值默认值是否必填说明name--是插件标识,可在插件详情页,或安装插件后看到标识id-$item-指定循环里的变量名,例如id='obj',模板调用如:{$item.title} 变成 {$obj.title}## 简单示例 检测标签插件是否安装,例如标签插件,安装后才执行里面的标签列表获取 ``` <pre class="calibre20">``` <span class="token1">{</span>hkcms<span class="token1">:</span>addons name<span class="token">=</span><span class="token4">"tags"</span><span class="token1">}</span> <span class="token"><</span><span class="token">!</span><span class="token">--</span><span class="token5">// 需要安装tags插件,上面检测到安装了tags标签,这里才会被执行。--></span> <span class="token1">{</span>hkcms<span class="token1">:</span>taglist arcid<span class="token">=</span><span class="token4">"$Info['id']"</span> model<span class="token">=</span><span class="token4">"$Info['model_id']"</span><span class="token1">}</span> <span class="token"><</span>a href<span class="token">=</span><span class="token4">"{$item.url}"</span><span class="token">></span><span class="token1">{</span>$item<span class="token1">.</span>title<span class="token1">}</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span> <span class="token1">{</span><span class="token">/</span>hkcms<span class="token1">:</span>taglist<span class="token1">}</span> <span class="token1">{</span><span class="token">/</span>hkcms<span class="token1">:</span>addons<span class="token1">}</span> ``` ```