数字化技能提升教程,数字化时代生存宝典

数字化百科 / 词条 / Siteserver-内容管理-获取内容

Siteserver-内容管理-获取内容

查看全部词条命名空间:Main

导航: 上一页

获取内容

  • BackgroundContentInfo GetContentInfo(int siteID , int contentID)

函数参数

参数 含义
int siteID 站点ID
int contentID 内容ID

返回值

含义
BackgroundContentInfo 返回内容实体,可以通过返回值获取内容属性。


本接口函数通过指定的站点ID和内容ID获取内容,如果对应的内容不存在,则返回null值。

获取内容示例

PageInfo pageInfo = PageInfo.GetInstance();//获取当前页面属性

BackgroundContentInfo contentInfo = ContentManager.GetContentInfo(pageInfo.SiteID, pageInfo.ContentID);


参考资料