묻고답하기
위젯에서 제목대신 분류를 표시할 수 있을까요?
2012.11.29 17:19
안녕하세요.
흐름 of 이미지라는 위젯을 사용 중인데
위젯 설정 시 제목만 표시할 수 있도록 되어있는데요.
제목 대신에 분류를 표시할 수 있도록 수정하는 방법이 있을까요?
아래는 해당 위젯의 list.htm 파일 내용입니다.
감사합니다.
<!--%import("./css/default.css")-->
<!--%import("./js/jquery.mousewheel.js")-->
<!--%import("./js/jcarousellite_1.0.1.js")-->
<!--%import("./js/jquery.easing.1.3.js")-->
<div class="carousel">
<controls">!--@if($widget_vals->controls == "buttons")-->
<a href="#" class="btn"><img src="./img/imageNavLeft.png" class="prev prev{$fi_widget_count} iePngFix" /></a>
<!--@end-->
<div class="jCarouselLite{$fi_widget_count} jCarouselLiteCommon">
<ul>
<document_list">!--@if(count($widget_vals->document_list))-->
<document_list">!--@foreach($widget_vals->document_list as $oDocument)-->
<document_srl">!--@if($oDocument->document_srl != 0)-->
<li><a href="{getUrl('','document_srl',$oDocument->document_srl)}" alt=""><img src="{$oDocument->getThumbnail($widget_vals->thumbnail_width,$widget_vals->thumbnail_height,$widget_vals->thumbnail_type)}">
<title_visibility">!--@if($widget_vals->title_visibility == "true")--><div class="title">{$oDocument->getTitle($widget_vals->title_length,'..')}</div><!--@end--></a></li>
<!--@end-->
<!--@end-->
<!--@else-->
<li class="noimage" style="width:{$widget_vals->thumbnail_width}px; height: {$widget_vals->thumbnail_height}px; " alt="첨부된 이미지가 없습니다."></li>
<!--@end-->
</ul>
</div>
<controls">!--@if($widget_vals->controls == "buttons")-->
<a href="#" class="btn"><img src="./img/imageNavRight.png" class="next next{$fi_widget_count} iePngFix" /></a>
<!--@end-->
</div>
<script type="text/javascript">
function dj(val){
if(window && window.console && window.console.debug) window.console.debug(val);
}
jQuery(document).ready(function(){
jQuery(".carousel .jCarouselLite{$fi_widget_count} li img")
.css('width', {$widget_vals->thumbnail_width})
.css('height', {$widget_vals->thumbnail_height})
.css('margin', {$widget_vals->img_margin})
.css('border-width', {$widget_vals->border_width})
.css('border-color', '{$widget_vals->border_color}')
.css('border-style', 'solid');
jQuery(".carousel .jCarouselLite{$fi_widget_count} .title")
.css("width", {$widget_vals->thumbnail_width} + {$widget_vals->img_margin} * 2)
.css("color", '{$widget_vals->title_color}')
.css("font-size", '{$widget_vals->title_size}')
.css("font-family", '{$widget_vals->title_font}');
if(jQuery(".jCarouselLite{$fi_widget_count}").jCarouselLite){
jQuery(".jCarouselLite{$fi_widget_count}").jCarouselLite({
<controls">!--@if($widget_vals->controls == "buttons")-->
btnNext: ".next{$fi_widget_count}",
btnPrev: ".prev{$fi_widget_count}",
<!--@end-->
<controls">!--@if($widget_vals->controls == "auto")-->
auto: {$widget_vals->auto_scroll_msec},
speed: {$widget_vals->scroll_speed},
<!--@end-->
<scroll_speed">!--@if($widget_vals->scroll_speed)-->
speed: {$widget_vals->scroll_speed},
<!--@end-->
<mouseoverstop">!--@if($widget_vals->mouseoverstop)-->
mouseOverStop: {$widget_vals->mouseoverstop},
<!--@end-->
<mouse_wheel">!--@if($widget_vals->mouse_wheel)-->
mouseWheel: {$widget_vals->mouse_wheel},
<!--@end-->
<sliding_effect">!--@if($widget_vals->sliding_effect)-->
easing: "{$widget_vals->sliding_effect}",
<!--@end-->
visible: {$widget_vals->shown_image_num}
});
}
jQuery('.carousel .prev{$fi_widget_count}, .carousel .next{$fi_widget_count}')
.css('top', ( parseInt(jQuery('.jCarouselLite{$fi_widget_count} li').height()) - parseInt(jQuery('.carousel .prev{$fi_widget_count}').height()) ) / 2);
});
</script>
<div class="title">{{$oDocument->getTitle($widget_vals->title_length,'..')}</div>
대신에
{@
$oDocumentModel = &getModel('document');
$category_info = $oDocumentModel->getCategory($oDocument->get('category_srl'));
}
<div class="title">{$category_info->title}</div>
를 넣어보세요