묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
블로그 카테고리별로 정렬 하기..
2008.01.21 01:05
http://wooya.wooriweb.net/wooya/WOOYA0blog
가셔서
Document List 를 누루시면 블로그에 쓴 글 목록들이 나옵니다.
이때 오른쪽 카테고리를 누르면 그에 따라서 Document List 의 정렬을 카테고리별로 바꿀수 있을까 하고요.
저한테는 너무 어렵군요
우선 Document List 소스 입니다.
newest_document 위젯의 디폴트를 수정한겁니다.
/widgets/newest_document/skins/default/js/list.js 를 추가시킨다.
function toggle(assa){
if(assa.style.display != "none"){
assa.style.display = "none";
}else{
assa.style.display = "";
}
}
if(assa.style.display != "none"){
assa.style.display = "none";
}else{
assa.style.display = "";
}
}
/widgets/newest_document/skins/default/list.html 수정
<!-- JS 파일 로드 -->
<!--%import("js/list.js")--> 추가
<!--%import("js/list.js")--> 추가
<table id="toggle" width="100%" border="0">
<tr><td><span onclick="toggle(list_view)">Document List</span></td></tr>
<tr id="list_view" style="display:none"><td>
<div class="newest_document_default_{$colorset}">
<div class="newest_document_default_box">
<!--@foreach($widget_info->document_list as $oDocument)-->
<div class="document_box">
<div class="document">
<a href="{$oDocument->getPermanentUrl()}#{$oDocument->getCommentCount()}"><a href="{getUrl('','mid',$mid,'category',$oDocument->get('category_srl'))}">*{$category_list[$oDocument->get('category_srl')]->title}*</a> {$oDocument->getTitle($widget_info->subject_cut_size)}</a>
<!--@if($oDocument->getCommentCount())-->
<span class="comment"><a href="{$oDocument->getPermanentUrl()}#comment">*{$oDocument->getCommentCount()}</a></span>
<!--@end-->
{$oDocument->printExtraImages($widget_info->duration_new)}
</div>
<div class="regdate">{$oDocument->getRegdate("Y-m-d")}</div>
</div>
<!--@end-->
</div>
</div>
</td></tr></table>
<tr><td><span onclick="toggle(list_view)">Document List</span></td></tr>
<tr id="list_view" style="display:none"><td>
<div class="newest_document_default_{$colorset}">
<div class="newest_document_default_box">
<!--@foreach($widget_info->document_list as $oDocument)-->
<div class="document_box">
<div class="document">
<a href="{$oDocument->getPermanentUrl()}#{$oDocument->getCommentCount()}"><a href="{getUrl('','mid',$mid,'category',$oDocument->get('category_srl'))}">*{$category_list[$oDocument->get('category_srl')]->title}*</a> {$oDocument->getTitle($widget_info->subject_cut_size)}</a>
<!--@if($oDocument->getCommentCount())-->
<span class="comment"><a href="{$oDocument->getPermanentUrl()}#comment">*{$oDocument->getCommentCount()}</a></span>
<!--@end-->
{$oDocument->printExtraImages($widget_info->duration_new)}
</div>
<div class="regdate">{$oDocument->getRegdate("Y-m-d")}</div>
</div>
<!--@end-->
</div>
</div>
</td></tr></table>
블로그 모듈
view_document.html 가장 위에 삽입
<div id="Document_List">
<img width="100%" height="100" src="http://wooya.wooriweb.net/wooya/common/tpl/images/widget_bg.jpg" class="zbxe_widget_output" style="clear:both;" widget="newest_document" body="" skin="blog_wooya_document" colorset="normal" widget_cache="0" title="" order_target="list_order" order_type="desc" list_count="100" duration_new="" subject_cut_size="" mid_list="WOOYA0blog" widget_sequence="480" />
</div>
<img width="100%" height="100" src="http://wooya.wooriweb.net/wooya/common/tpl/images/widget_bg.jpg" class="zbxe_widget_output" style="clear:both;" widget="newest_document" body="" skin="blog_wooya_document" colorset="normal" widget_cache="0" title="" order_target="list_order" order_type="desc" list_count="100" duration_new="" subject_cut_size="" mid_list="WOOYA0blog" widget_sequence="480" />
</div>
너무 어렵네요... ~_~
give me hand..