SinGooCMS 语法说明

最后更新日期:2015-11-20

基本字段

${mbpath} 当前默认模板的路径
${currip} 当前IP
${currnode} 当前栏目
${currcont} 当前内容
${currcate} 当前商品分类
${currpro} 当前商品
${currpage} 当前页码
${loginuser} 当前登录会员
${seokey} 全局的搜索关键字
${seodesc} 全局的搜索描述信息
${lang} 当前语种 如zh-cn、zh-tw、en
${cmsext.[方法体]} cms功能的扩展

主要功能

${config.[属性键名称]} 读取配置信息

$cms. cms提供的方法
string Cut(string strSource, int intLength, string strAppend) 截取字符串
string FixBadword(string strSource) 替换原文中的敏感字、脏词
string FormatDate(string time[, string formatPattern]) 格式化日期
IList<NodeInfo> GetAllNodes() 获取所有栏目列表
IList<NodeInfo> GetAllChildNodes(int intParentID[/string strParentIdentifier]) 获取所有的子栏目(包括所有多级子栏目)
IList<NodeInfo> GetChildNodes(int intParentID[/string strParentIdentifier]) 获取直系子栏目
IList<NodeInfo> GetNodes(string strNodeIDs) 获取指定的栏目列表
IList<NodeInfo> GetNodeNav(int intNodeID[/string strNodeIdentifier]) 获取栏目导航
NodeInfo GetNode(int intNodeID[/string strNodeIdentifier]) 获取栏目信息
NodeInfo GetRootNode(int nodeID[/string strNodeIdentifier]) 获取栏目的顶级栏目
IList<ContHelper> GetContents(int intNodeID[/string strNodeIdentifier], int intGetNum) 获取指定栏目的内容列表
IList<ContHelper> GetContents(int intNodeID[/string strNodeIdentifier], string strCondition, string strSort, int intGetNum) 获取指定栏目的内容列表
IList<ContHelper> GetContents(int intNodeID[/string strNodeIdentifier], string strCondition, string strSort, int pageIndex, int pageSize[,副表字段]) 获取指定栏目的分页内容列表
int GetCount(int intNodeID[/string strNodeIdentifier], string strCondition) 获取指定栏目的内容数量
ContentInfo GetContent(int intContentID) 获取内容信息
ContentInfo GetSingleCont(int intNodeID[/string strNodeIdentifier]) 获取栏目的单页内容信息
ContentInfo GetPrevContent(int intCurrContentID[,int intNodeID]) 上一条内容
ContentInfo GetNextContent(int intCurrContentID[,int intNodeID]) 下一条内容
IList<AttachmentInfo> GetAttachments(string strAttachmentIDs) 获取附件信息
DictsInfo GetDict(int intDictID[/string strDictName]) 获取字典信息
IList<DictItemInfo> GetItemsByDictID(int intDictID[/string strDictName]) 获取指定字典的内容列表
DictItemInfo GetDictItem(int intDictID[/string strDictName], string strItemKey) 获取指定字典的内容信息
DataRowCollection GetSQL(string strSQL) 指定一段SQL语句并返回集合(不推荐)
void ExecSQL(string strSQL) 指定一段SQL语句并无返回值(不推荐)
string HtmlEncode[/HtmlDecode](string strSource) HTML编码/解码
string UrlEncode[/UrlDecode](string strSource) URL编码/解码
string DesEncode[/DesDecode](string strSource) DES可逆加/解密
string MD5Encode(string strSource) 获取MD5加密后的代码

$shop. shop提供的方法
CategoryInfo GetCate(int categoryID[/string strIdentifier]) 获取商品分类信息
IList<CategoryInfo> GetAllChildCates(int intParentID[/string strIdentifier]) 获取指定分类的所有子分类
IList<CategoryInfo> GetChildCates(int intParentID[/string strIdentifier]) 获取指定分类的直系子分类
IList<CategoryInfo> GetCates(string strCateIDs) 获取指定的多个分类列表
ProductInfo GetProduct(int intProductID) 获取商品信息
IList<ProHelper> GetProducts(int intCategoryID, int intGetNum) 获取分类的商品列表
IList<ProHelper> GetProducts(int intCategoryID, int pageIndex, int pageSize) 获取分类的分页商品列表
IList<ProHelper> GetProducts(string strCondition, string strSort, int pageIndex, int pageSize) 获取分类的商品分页列表
IList<PhotoAlbumInfo> GetAlbums(int intProductID) 获取商品相册
IList<ProHelper> GetHistoryProducts(int intHistoryNum) 获取商品浏览历史记录
IList<CartInfo> GetShoppingCarts() 获取购物车中商品列表
int GetCartCount() 获取购物车中商品数量
IList<ShippingAddressInfo> GetShippingAddrs(int intUserID) 获取会员的收货地址
copyright @SinGooCMS 2012-2015 www.SinGooCMS.com