demo :
Hướng dẫn:
Bước 1: ACP >> Display >> Homepage >> Structure and hierarchy:
Sub-level links on index : Có
Bước 2: ACP >> Display >> Templates >> Ganeral >> Index_box:
Tìm:
- Code:
{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
- Code:
<select style="display:none" onchange="location = this.options[this.selectedIndex].value;">
<option value="{catrow.forumrow.U_VIEWFORUM}">Các Diễn Đàn Con</option>
</select>
<span style="display:none" class="subforumFMvi">{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}</span>
- Code:
<script type="text/javascript">
$(".subforumFMvi a").each(function () {
$(this).replaceWith('<option value="' + $(this).attr("href") + '">|-- ' + $(this).text() + '</option>');
});
$(".subforumFMvi option").each(function () {
$(this).appendTo($(this).parent().prev())
});
$(".subforumFMvi").each(function () {
if ($(this).text() == "") {
$(this).prev().remove();
$(this).remove();
} else {
$(this).prev().show()
}
});
</script>