html 类别树:顶级readytheme,拉入子类

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html 类别树:顶级readytheme,拉入子类相关的知识,希望对你有一定的参考价值。

<div class="&mvte:readytheme:code;">
<mvt:if expr="NOT ISNULL l.settings:readytheme:navigationitems">
<ul class="&mvte:readytheme:layout;">
<mvt:foreach iterator="navigationitem" array="readytheme:navigationitems">

  <mvt:do name="l.result" file="g.Module_Library_DB" value="Category_Load_Code( l.settings:category:code, l.settings:current_category )" />
  <mvt:do name="l.result" file="g.Module_Library_DB" value="Category_Load_ID( l.settings:current_category:parent_id, l.settings:parent_category )" />

  <mvt:if expr="l.settings:navigationitem:link_dest EQ l.settings:category:code OR l.settings:navigationitem:link_dest EQ l.settings:parent_category:code">
    <li class="level-1 active">&mvt:navigationitem:link;
  <mvt:else>
    <li class="level-1">&mvt:navigationitem:link;
  </mvt:if>

  <mvt:if expr="l.settings:navigationitem:link_dest EQ l.settings:category:code OR l.settings:navigationitem:link_dest EQ l.settings:parent_category:code">
  <mvt:comment>
  <mvt:foreach iterator="navigationitem_level2" array="navigationitem:items">
    <mvt:if expr="l.settings:navigationitem_level2:link_dest EQ l.settings:category:code">
      <li class="level-2 active">&mvt:navigationitem_level2:link;
    <mvt:else>
      <li class="level-2">&mvt:navigationitem_level2:link;
    </mvt:if>
    <mvt:if expr="NOT ISNULL l.settings:navigationitem_level2:items AND l.settings:navigationitem_level2:link_dest EQ l.settings:category:code">
      <ul>
      <mvt:foreach iterator="navigationitem_level3" array="navigationitem_level2:items">
        <mvt:if expr="l.settings:navigationitem_level2:link_dest EQ l.settings:category:code">
          <li class="level-3 active">&mvt:navigationitem_level3:link;
        <mvt:else>
          <li class="level-3">&mvt:navigationitem_level3:link;</li>
        </mvt:if>      
      </mvt:foreach>
      </ul>
    </mvt:if>
    </li>
  </mvt:foreach>
  </mvt:comment>
	<mvt:foreach array="cattree_categories" iterator="cattree_category">
	  <mvt:if expr="l.settings:cattree_category:level NE 1">
	    <mvt:if expr="(l.settings:category:id AND l.settings:category:id EQ l.settings:cattree_category:id) OR (l.settings:cattree_category:code EQ l.settings:breadcrumbs:links[1]:code)">
	      <mvt:assign name="l.settings:cattree_category:class" value="'active'" />
	    <mvt:elseif expr="g.Category_Code AND ISNULL l.settings:category:id AND l.settings:cattree_category:code EQ g.Category_Code">
	      <mvt:assign name="l.settings:cattree_category:class" value="'active'" />
	    </mvt:if>
	    <li class="level-&mvte:cattree_category:level; &mvte:cattree_category:class;"><a href="&mvte:cattree_category:link;">&mvte:cattree_category:name;</a></li>
	  </mvt:if>
	</mvt:foreach>  
  </mvt:if>
  </li>
</mvt:foreach>
</ul>
</mvt:if>
</div>

以上是关于html 类别树:顶级readytheme,拉入子类的主要内容,如果未能解决你的问题,请参考以下文章

xml 类别树Readytheme项目 - 最大

xml Readytheme基于类别代码//检查是否存在并显示。 //你可以拥有一堆不同的布局:)

xml Readytheme基于类别代码//检查是否存在并显示。 //你可以拥有一堆不同的布局:)

php 相关帖子,随机拉入同一类别,不包括当前帖子。

php 相关帖子,随机拉入同一类别,不包括当前帖子。

html 级别ReadyTheme导航修复