Siteserver-stl:sitesItem获取站点列表项
来自站长百科
导航: 上一页
stl:sitesItem 获取站点列表项
- 控制站点列表中每一项的显示内容及样式,请参考列表元素及列表项
属性列表
下表显示所有属于此元素的属性列表
注意
- <stl:sitesItem> 元素必须包含在元素 <stl:sites> 内使用。
- Item 类型的列表项可以为空,系统将使用列表元素中除列表项以外的其他内容作为 Item 类型列表项的值。
- Item、AlternatingItem、Separator三种类型的栏目列表项在站点列表中最多只能有一个,SelectedItem类型的站点列表项可以有零个或多个。
- SelectedItem 类型的站点列表项所显示的内容由 selected 属性控制,默认第一条内容为选中项。
stl:sitesItem 示例
- 示例一:显示站点列表。
其中列表中第一项到第三项显示最新小图标。
<stl: sites cellpadding="2" cellspacing="2" layout="Table"> <stl: sitesItem type="SelectedItem" selected="1-3"> <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td> <a href="{ Stl.SiteUrl}"><stl: value type="SiteName"></stl: value></a> <img src="/images/new.gif" /> </td></tr></table> </stl: sitesItem> <stl: sitesItem type="Item"> <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td> <a href="{ Stl.SiteUrl}"><stl: value type="SiteName"></stl: value></a> </td></tr></table> </stl: sitesItem> </stl: sites>