讯睿CMS问答:多栏目搜索这块,想展示特定的栏目怎么做

讯睿CMS问答:多栏目搜索这块,想展示特定的栏目怎么做

2024-10-01 XunRuiCMS Sincere

问题:

请问多栏目搜索的这块,想约束特定的栏目id搜索,应该怎么写呢

这段标签会列出所有的栏目,我想要几个就行

{php $top_search=[];} {cache name=module-content} {if $t.search} {php !$top_search && $top_search=$t;}

  • {$t.name}
  • {/if} {/cache}

    答案:

    {cache name=module-content} 这个是循环模块的,并不是循环栏目啊,跟栏目没有任何关系

    回复@迅睿框架技术-胡老师 哦哦,对对,这块怎么约束我想要的模块啊,就是比如我有6个模块,我只想要其中3个

     {cache name=module-content}{if in_array($t.dirname, ['模块1目录', '模块2目录']) && $t.search}

    @遗忘:非常感谢大佬的回答,完美