织梦文章列表样式多元化实现

{dede:list pagesize='10'}
  <LI><a href="[field:arcurl/]"  >[field:title/]</a><SPAN>[field:pubdate function="GetDateTimeMK(@me)"/]</SPAN></LI>
  <SCRIPT>
if(n%5==0)
{
document.write('<li></li> ');
}
n++;
</SCRIPT>
  {/dede:list}
<script type="text/javascript">
                        var n=1;
                </script>
                {dede:channel} 
                        <script type="text/javascript">

                                    if(n==1)
                                    {
                                       document.write('<li><a class="icon2" href="[field:typelink/]">[field:typename/]</a></li> ');
                                    }
                                    else if(n==2)
                                    {
                                        document.write('<li><a class="icon7" href="[field:typelink/]">[field:typename/]</a></li> ');    
                                    }
                                    else if(n==3)
                                    {
                                        document.write('<li><a class="icon12" href="[field:typelink/]">[field:typename/]</a></li> ');    
                                    }
                                    n++;
                        </script>                                            
                {/dede:channel} 

 

posted @ 2014-05-29 08:25  timelesszhuang  阅读(245)  评论(0编辑  收藏  举报