- Tuy mình làm xtgem nhưng vẫn đua đòi wordpress và johncms. Sau đây là bản mod phân trang wordpress cho xtgem
- Demo ảnh:
- Xóa cái phân trang hiện tại(nếu có)
- Tạo tập tin tên
page.xt dán:
<!--parser:xtscript-->
function paging_template $page;$active_page;$total_pages;
if $page == 1
print <b><div class='wp-pagenavi'>
if $page == 2
print <a href="$surl?__filelist_page=$page">‹</a>
elseif 1 == $active_page
print <a href="$surl?__filelist_page=-1">«</a><a href="$surl?__filelist_page=$page">$page</a>
elseif 2 == $active_page
print <a href="$surl?__filelist_page=1">‹</a>
elseif $page == $active_page
print <span class='current'>$page</span>
elseif -1 == $active_page
print <a href="$surl?__filelist_page=$page">$page</a>
elseif -2 == $active_page
print <a title="Xem Trang $page" href="$surl?__filelist_page=$page">$page</a> <a class="nextpostslink" href="$surl?__filelist_page=-1">»</a>
endif
if $page == $total_pages
print <a class="last" title="Xem Trang $total_pages" href="$surl?__filelist_page=$total_pages">›</a></div></b>
endif
endfunction
<!--/parser:xtscript-->
- Dán code sau vào _header của wap bạn:
<xt:include file="/page.xt" />
- Mod url phân trang dạng /?page=1