{template "header.html"}

<div class="page-container ">
    <div class="page-content-wrapper">


        <div class="page-head">
            <div class="container">
                <div class="page-title">
                    <h1>
                    {loop $related $t}
                    <a class="btn btn-default {if $t.id==$tag.id}dark{/if} btn-xs" href="{$t.url}">{$t.name}</a>
                    {/loop}
                   </h1>
                </div>
            </div>
        </div>
        <div class="page-content">

            <div class="container">
                <ul class="page-breadcrumb breadcrumb">
                    <li>
                        <a href="{SITE_URL}">网站首页</a>
                        <i class="fa fa-circle"></i>
                    </li>
                    {if $parent}
                    <li>
                        <a href="{$parent.url}">{$parent.name}</a>
                        <i class="fa fa-circle"></i>
                    </li>
                    {/if}
                    <li>
                        <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">
                    <!-- 调用全部内容模块,并循环输出相关内容数据 -->
                    {list action=cache name=module 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条 -->
                                    {list action=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>
                                    {/list}
                                </ul>
                            </div>
                        </div>
                    </div>
                    {/list}
                </div>


            </div>

        </div>
    </div>
</div>

{template "footer.html"}