XE

XE게시판 리스트 1차 카테고리 선택시 2차 카테고리 출력

by 이온디 posted Jan 02, 2022
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form
<div class="cnb_n_list" style="display:none;">
            <style>
                .cnb_n_list .cTab li ul{display:none;}
                .cnb_n_list .cTab li.on ul{display:block;}
            </style>
                {@ $cate_list = array(); $current_key = null; }
                <!--@foreach($category_list as $key=>$val)-->
                <!--@if(!$val->depth)-->
                {@
                $cate_list[$key] = $val;
                $cate_list[$key]->children = array();
                $current_key = $key;
                }
                <!--@elseif($current_key)-->
                {@ $cate_list[$current_key]->children[] = $val }
                <!--@end-->
                <!--@end-->
                <ul class="cTab clear">
                    <li class="home<!--@if(!$category)--> on<!--@end-->"><a href="{getUrl('category','','page','','document_srl','')}" title="{$lang->document_count} {number_format($total_count)}">{$lang->total}<small cond="$mi->cnb_count">({number_format($total_count)})</small></a></li>
                    <li loop="$cate_list=>$key,$val" class="on"|cond="$category==$val->category_srl">
                        <a href="{getUrl(category,$val->category_srl,'document_srl','','page','')}" style="color:{$val->color}"|cond="$val->color!='transparent'">{$val->title}<small cond="$mi->cnb_count">({$val->document_count})</small></a>
                        <ul cond="count($val->children)">
                            <li loop="$val->children=>$idx,$item" class="on"|cond="$category==$item->category_srl"><a href="{getUrl(category,$item->category_srl,'document_srl','','page','')}" style="color:{$item->color}"|cond="$item->color!='transparent'">{$item->title}</a></li>
                        </ul>
                    </li>
                </ul>
        </div>
        <div class="category-box" cond="$category_list && !$search_keyword" style="display:none;">
            <div class="cat-root">
<!--                <a href="{getUrl('','mid',$mid,'category','','page','','document_srl','')}" class="on"|cond="!$category">전체 {$total_count} </a>-->
                <!--@foreach($category_list as $val)-->
                <a href="{getUrl('category',$val->category_srl,'page','','document_srl','')}" class="on"|cond="$val->selected" cond="$val->depth==0">{$val->title} {$count}{$val->category_srl} / 깊이{$val->depth}/ 부모:{$val->parent_srl}</a>
                <!--@endforeach-->
            </div>
            <div class="cat-sub" style="display:flex;">
<!--                $val->parent_srl==$category
 cond="$val->category_srl == $val->parent_srl"
-->
                <!--@foreach($category_list as $val)-->
                <div style="padding: 1rem;display:flex;"><div style="flex:1;"><pre>{implode(',',$val->childs)}</pre></div></div>
                <a href="{getUrl('category',$val->category_srl,'page','','document_srl','')}" class="on"|cond="$val->selected" cond="$val->depth!==0">#{$val->title} {$count}{$val->category_srl} / 깊이{$val->depth} / 부모:{$val->parent_srl}</a>
                <!--@endforeach-->
            </div>
        </div>
        <div class="cate">
            {@ $_cdepth = 0;}
            <block loop="$category_list => $key, $val">
                <block cond="$_cdepth > $val->depth">{@ $_cdepth = $val->depth}</block>
                <block cond="$val->expand"><a href="{getUrl('category',$val->category_srl, 'document_srl', '')}">{$val->text}</a> > </block>
                <block cond="$val->category_srl==$oDocument->get('category_srl')"><a href="{getUrl('category',$val->category_srl, 'document_srl', '')}">{$val->text}</a></block>
                <block cond="$val->child_count">{@$_cdepth++}</block>
            </block>
        </div>

관련글

https://opentutorials.org/module/3774/24591

http://chongmoa.com/xe/816

http://chongmoa.com/xe/815


Who's 이온디

profile

라이믹스는 이온디와 함께



Articles