Để hiện thị hình ảnh nhỏ bên tin bên phải hay trái hoặc dưới chuyên mục ta làm như sau
mở file: themes/default/css/news.css tìm đoạn css:
div.news_column ul.related li { padding:0 4px 0 0; }
thêm float: left; ta được
div.news_column ul.related li { float: left; padding:0 4px 0 0; }
- Tiếp theo ta mở file mở file: themes/default/modules/news/viewcat_main_right.tpl
tìm
<!-- BEGIN: related --> Nội dung bên trong <!-- END: related -->
thay thế bằng đoạn này
<!-- BEGIN: related --> <div class="col-md-8"> <ul class="related"> <!-- BEGIN: loop --> <li> <a class="show h4" href="{OTHER.link}" title="{OTHER.title}" <!-- BEGIN: tooltip -->data-content="{OTHER.hometext}" data-img="{OTHER.imghome}" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip -->><img src="{OTHER.imghome}" alt="{OTHER.title}" width="50" class="img-thumbnail pull-left " />{OTHER.title_0}</a> </li> <!-- END: loop --> </ul> </div> <!-- END: related -->
Tiếp theo mở file modules/news/theme.php tìm function viewsubcat_main($viewcat, $array_cat)
kéo xuống dưới tìm dòng $xtpl->assign('OTHER', $array_row_i);
trước nso ta thêm đoạn
$array_row_i['title_0'] = nv_clean60($array_row_i['title'], 50);
xong hoàn tất