点击不同选项实现不同的排序效果,切换上下页依旧是当前排序效果
目前测试可以实现 时间/浏览量/点赞量/随机排序 带缩略图/无缩略图
以下是html代码
07 |
border-bottom: 1px solid |
16 |
display: inline-block; |
31 |
排序:<a href= "?id=date" <?php $ id =$_GET[ 'id' ]; if ($ id === "date" ) { echo 'class=active' ;} else {}?>>时间</a> |
32 |
<a href= "?id=visits" <?php $ id =$_GET[ 'id' ]; if ($ id === "visits" ) { echo 'class=active' ;} else {}?>>浏览量</a> |
33 |
<a href= "?id=likes" <?php $ id =$_GET[ 'id' ]; if ($ id === "likes" ) { echo 'class=active' ;} else {}?>>点赞量</a> |
34 |
<a href= "?id=random" <?php $ id =$_GET[ 'id' ]; if ($ id === "random" ) { echo 'class=active' ;} else {}?>>随机</a> |
35 |
<a href= "?id=ico" <?php $ id =$_GET[ 'id' ]; if ($ id === "ico" ) { echo 'class=active' ;} else {}?>>带图</a> |
36 |
<a href= "?id=noico" <?php $ id =$_GET[ 'id' ]; if ($ id === "noico" ) { echo 'class=active' ;} else {}?>>无图</a> |
|
PbootCMS列表循环代码
1 |
{pboot:list scode={ sort :scode} num=10 page=1 <?php $ id =$_GET[ 'id' ]; if ($ id === "date" ) { echo 'order=date' ;} elseif($ id === "visits" ) { echo 'order=visits' ;} elseif($ id === "likes" ) { echo 'order=likes' ;} elseif($ id === "random" ) { echo 'order=random' ;} elseif($ id === "ico" ) { echo 'isico=1' ;} elseif($ id === "noico" ) { echo 'isico=0' ;}?>} |
3 |
<a href= "[list:link]" title= "[list:title]" >[list:title]</a> |
|