|
目录
来源:http://trac.seagullproject.org/wiki/Modules/Publisher Publisher模块通过Publisher模块,Seagull允许创建三种类型的内容.虽然在此将只讨论三种类型,但它十分容易自定义。
使用SGL_Item管理内容Item这只是一个关于如何使用SGL_Item简单的例子,如果想看看功能的完全概述,请浏览lib/SGL/SGL_Item.php Retrieving Content ItemsRetrieving a Single Content Item查看:代码实例ArticleViewMgr::_view(),API文档SGL_Item.php::getItemDetail() $ret = SGL_Item::getItemDetail($input->articleID, null, $input->articleLang); 标页数的Content Items查看:代码实例ArticleViewMgr::_summary(),API文档SGL_Item.php::retrievePaginated() $aResult = SGL_Item::retrievePaginated( $input->catID, $bPublish = true, $input->dataTypeID, '', $input->from, 'start_date'); 展开的Content Items添加一个新的Content Item给Publisher添加一个用来存放内容的分类是相当容易的. 例如:最近我需要一个天气报告的内容
你需要执行以下操作:
if ($input->dataTypeID == 2 }| $input->dataTypeID == 6 || $input->dataTypeID == 7)
|