Siteserver-显示CMS系统外数据
查看全部词条命名空间:Main
导航: 上一页
除了通过STL标签显示栏目及内容等数据,SiteServer CMS还提供了机制显示CMS系统外的数据。
以下四个标签是专为显示其他系统中的数据而设计的:
可以在栏目或者内容中添加其他系统中表的标识,通过栏目或者内容模板显示和此标识相关的数据,示例:
<stl:sqlContents connectionString="server=(local);uid=sa;pwd=bairong;Trusted_Connection=no;database=ccs1.1" cellpadding="2" cellspacing="2">
<stl:queryString>
SELECT TOP 6 Title, PostDate, PostUrl FROM MyTable
WHERE (PostType = ) ORDER BY PostDate DESC
</stl:queryString>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>·<a href=""><stl:sqlContent type="Title" wordnum="20"></stl:sqlContent></a></td>
<td><stl:sqlContent type="PostDate" formatString="yyyy-MM-dd"></stl:sqlContent></td>
</tr>
</table>
</stl:sqlContents>