最近想自己写一些标签,看了一下JEECMS,感觉有些标签还是很值得学习的。
1、图片新闻:可以实现类似于flash切换图片的那种效果
效果:
代码:
[@cms.ArtiList chnlId=” attr=’3′ count=’6′ sysContent=’3-1′ titLen=’35’ flashWidth=’507′ flashHeight=’338’/]
其中sysContent=’3-1’指的就是以flash方式显示图片新闻。
类似的内容样式还有:
1-1:普通标题列表
1-2:图文列表
2-1:标题列表翻滚
2-2:图文列表翻滚
3-1:焦点图
2、新闻列表:
代码:
[@cms.ArtiList chnlId=’14’ count=’7′ sysContent=’1-1′ titLen=’36’ lineHeight=’3′ dateFormat=’4′ datePosition=’2′ headMark=’3′ target=’1’/]
具体参数太多了,还是拷贝一下吧:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3、显示栏目名称:
[@cms.ChnlList hasContent=’1′ inner=’1′;c]
<div class=”news_list_m”><a href=”${c.url}”>${c.name}</a></div>
[/@cms.ChnlList]
4、实现图片滚动效果(类似跑马灯):
这个还真是费了些周折,本来JEECMS文档中说支持这种滚动效果,可试了半天就是不“滚动”,我试的代码:
[@cms.ArtiList chnlId=” attr=’3′ sysContent=’2-2′]
后来没办法,自己写了一个:
<div id=”expert” style=”width: 507px; height: 130px; color: #ffffff; overflow: hidden”> <table border=”0″ cellpadding=”0″ align=”left” cellspace=”0″> <tbody> <tr> <td align=”center”><img alt=”” width=”170″ height=”130″ src=”${root}/fwjn/article/img/tu7.jpg” /></td> <td align=”center”> <div id=”demo” style=”width: 337px; height: 80px; color: #ffffff; overflow: hidden;valign:center”> <table border=”0″ cellpadding=”0″ align=”left” cellspace=”0″> <tbody> <tr> <td id=”demo1″ valign=”center”> <table border=”0″ cellspacing=”0″ cellpadding=”5″> <tbody> <tr align=”center”> [@cms.ArtiList chnlId=’21’ attr=’5′ orderBy=’9′ inner=’1′;ca] [#if ca.imgUrl?length lte 10 ] [#else] <td width=”60″> <a target=”_blank” href=”${ca.url}”> <img alt=”${ca.title}” width=”60″ height=”80″ src=”${ca.imgUrl}”/> </a> </td> [/#if] [/@cms.ArtiList] </tr> </tbody> </table> </td> <td id=”demo2″ valign=”center”></td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> </div>
<p><SCRIPT> |