现在的位置: 首页 > 综合 > 正文

cms初学

2019年11月16日 ⁄ 综合 ⁄ 共 1512字 ⁄ 字号 评论关闭

在包含文件中

引用css       <link type="text/css" rel="Stylesheet" href="{Stl.SiteUrl}/css/a_common.css" />/*暂时*/

引用img      <img src="{Stl.SiteUrl}/img/a_Nav1.png"/>

 

系统首页模板

引用css        <link type="text/css" rel="Stylesheet" href="{Stl.SiteUrl}/css/a_common.css" />

引用头文件   <stl:include file="include/head.html"></stl:include>

引用img       <img src="img/p1.jpg" />

 

系统栏目模板

引用css        <link type="text/css" rel="Stylesheet" href="{Stl.SiteUrl}/css/a_common.css" />

引用img      <img src="{Stl.SiteUrl}/img/p1.jpg" />

 

 

内容<stl:content type="ID"></stl:content>   等于{Content.ID}

  ID   内容ID
  AddUserName   内容添加者
  AddDate   内容添加时间
  LastEditUserName   最后修改内容的用户名
  LastEditDate   内容的最后修改时间
  Title 内容标题
  SubTitle   内容副标题
  Summary   内容简介
  ImageUrl   内容图片
  LinkUrl   内容链接
  FileUrl   内容附件
  Author   内容作者
  Source   内容来源
  Content   内容正文
  ItemIndex   项次序数字

栏目<stl:channel type="Title"></stl:channel> 等于{Channel.Title}

注:{Channel.Title_indexName}显示栏目索引为indexName的Title

  Title 显示栏目的名称
  ChannelID   栏目ID
  Content   显示栏目的正文
  AddDate   显示栏目添加日期
  ImageUrl   显示栏目图片
  ItemIndex   项次序数字
  CountOfChannels   子栏目数
  CountOfContents   内容数
  CountOfImageContents   图片内容数

评论<stl:comment type="UserName"></stl:comment>等于{comment.UserName}

  UserName   评论人
  Email   评论人邮箱
  Content   评论正文
  AddDate   评论日期
  ID   评论ID
  ItemIndex   项次序数字

获取数据库数据<stl:sqlContent type="ItemIndex"></stl:sqlContent> 等于{sqlContent.ItemIndex}

 

ItemIndex

 

项次序数字

 

 

STL 实体是左大括号({)和右大括号(})以及位于二者之间的所有内容。有开始标记和结束标记(例如{Stl.SiteName}) 。

STL 实体能够嵌入到HTML 语言或STL 语言的任何位置,(例如内容模版中 <stl:a title="{Content.Title}"></stl:a>)。

又如{channel.Type}

 

导航的简单写法

{Channel.NavigationUrl_cpjs}即:{Channel.NavigationUrl_导航索引}

 

对于栏目页的地址显示想要更灵活

则在【修改栏目】-【生成页面路径】后输入自己想设的地址即可

【上篇】
【下篇】

抱歉!评论已关闭.