联系官方销售客服

1835022288

028-61286886

求助 版主:论坛审计组
关键词库的调用求解在tag列表页面判断当前tag所属模块如果
类型:迅睿CMS 更新时间:2019-06-29 15:34:38
POSCMS4

关键词库的调用求解,在tag列表页面判断当前tag所属模块,如果是down模块就显示1如果是news就显示2,请问判断应该怎么写

下面是tag页面的代码

                        <span>TAG: {$tag.name}</span>
                    </li>
                </ul>

                {if $tag.id}
                <div class="row">
                    <div class="col-lg-12">
                        <div class="portlet light">
                            <div class="portlet-title">
                                <div class="caption">
                                    <span class="caption-subject font-green">{$tag.name}</span>
                                </div>
                            </div>
                            <div class="portlet-body">
                                {$tag.content}
                            </div>
                        </div>
                    </div>
                </div>
                {/if}

                <div class="row">
                    <!-- 调用全部内容模块,并循环输出相关内容数据 -->
                    {cache name=module-content return=c}
                    <div class="col-md-6">
                        <div class="portlet light">
                            <div class="portlet-title">
                                <div class="caption">
                                    <span class="caption-subject"><a class="font-green" href="{$c.url}">{$tag.name}的{$c.name}</a></span>
                                </div>
                            </div>
                            <div class="portlet-body">
                                <ul class="list-unstyled fc-list-row">
                                    <!-- 调用$c.dirname模块的相关tag内容 显示5条 -->
                                    {related module=$c.dirname field=title,url tag=$tag.tags num=5}
                                    <li><span class="badge badge-empty badge-success"></span> <a href="{$t.url}" class="title">{dr_strcut($t.title, 35)}</a></li>
                                    {/related}
                                </ul>
                            </div>
                        </div>
                    </div>
                    {/cache}


回帖
  • #1楼    迅睿框架创始人
    2019-06-29 15:07:44
    0
      {cache name=module-content return=c}
      {if $c.dirname == "down"}
      111
      {/if}
        {if $c.dirname == "news"}
      111
      {/if}
    满意答案
  • 华仔
    #2楼    华仔
    2019-06-29 15:34:38
    0
    迅睿框架创始人:谢谢老大了