本文整理汇总了C#中Carrotware.CMS.Core.ContentPageType类的典型用法代码示例。如果您正苦于以下问题:C# ContentPageType类的具体用法?C# ContentPageType怎么用?C# ContentPageType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContentPageType类属于Carrotware.CMS.Core命名空间,在下文中一共展示了ContentPageType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ContentPage
public ContentPage(Guid siteID, ContentPageType.PageType pageType) {
this.Root_ContentID = Guid.NewGuid();
this.ContentID = Guid.NewGuid();
this.ContentType = pageType;
this.SiteID = siteID;
this.VersionCount = 0;
this.CreateDate = SiteData.GetSiteByID(siteID).Now;
this.EditDate = this.CreateDate;
this.GoLiveDate = this.CreateDate.AddMinutes(-5);
this.RetireDate = this.CreateDate.AddYears(200);
this.NavMenuText = "PAGE " + this.Root_ContentID.ToString().ToLower();
this.FileName = "/" + this.Root_ContentID.ToString().ToLower() + ".aspx";
this.TemplateFile = SiteData.DefaultTemplateFilename;
this.BlockIndex = false;
this.PageActive = true;
this.ShowInSiteMap = true;
this.ShowInSiteNav = true;
this.LeftPageText = PageContentEmpty;
this.RightPageText = PageContentEmpty;
this.PageText = PageContentEmpty;
if (pageType != ContentPageType.PageType.ContentEntry) {
this.Parent_ContentID = null;
this.NavOrder = SiteData.BlogSortOrderNumber;
this.ShowInSiteMap = false;
this.ShowInSiteNav = false;
}
this.ContentCategories = new List<ContentCategory>();
this.ContentTags = new List<ContentTag>();
}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:35,代码来源:ContentPage.cs
示例2: GetAllByTypeList
internal static IQueryable<vw_carrot_Content> GetAllByTypeList(CarrotCMSDataContext ctx, Guid siteID, bool bActiveOnly, ContentPageType.PageType entryType) {
return (from ct in ctx.vw_carrot_Contents
orderby ct.NavOrder, ct.NavMenuText
where ct.SiteID == siteID
&& ct.IsLatestVersion == true
&& (ct.PageActive == true || bActiveOnly == false)
&& (ct.GoLiveDate < DateTime.UtcNow || bActiveOnly == false)
&& (ct.RetireDate > DateTime.UtcNow || bActiveOnly == false)
&& ct.IsLatestVersion == true
&& ct.ContentTypeID == ContentPageType.GetIDByType(entryType)
select ct);
}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:12,代码来源:CannedQueries.cs
示例3: GetLatestContentPagedList
public List<SiteNav> GetLatestContentPagedList(Guid siteID, ContentPageType.PageType postType, bool bActiveOnly, int pageSize, int pageNumber, string sortField, string sortDir) {
return SiteNavHelper.GetSamplerFakeNav(pageSize);
}
开发者ID:ithanshui,项目名称:CarrotCakeCMS-MVC,代码行数:3,代码来源:SiteNavHelperMock.cs
示例4: GetSitePageCount
public int GetSitePageCount(Guid siteID, ContentPageType.PageType entryType, bool bActiveOnly)
{
int iCount = CannedQueries.GetAllByTypeList(db, siteID, bActiveOnly, entryType).Count();
return iCount;
}
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:5,代码来源:ContentPageHelper.cs
示例5: GetPagedSortedContent
public List<ContentPage> GetPagedSortedContent(Guid siteID, ContentPageType.PageType entryType, bool bActiveOnly, int pageSize, int pageNumber, string sSortParm)
{
string sortField = "";
string sortDir = "";
IQueryable<vw_carrot_Content> query1 = null;
if (!String.IsNullOrEmpty(sSortParm)) {
int pos = sSortParm.LastIndexOf(" ");
sortField = sSortParm.Substring(0, pos).Trim();
sortDir = sSortParm.Substring(pos).Trim();
}
query1 = CannedQueries.GetAllByTypeList(db, siteID, bActiveOnly, entryType);
return PerformDataPagingQueryableContent(siteID, bActiveOnly, pageSize, pageNumber, sortField, sortDir, query1);
}
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:16,代码来源:ContentPageHelper.cs
示例6: GetLatestContentPagedList
public List<ContentPage> GetLatestContentPagedList(Guid siteID, ContentPageType.PageType postType, bool bActiveOnly, int pageSize, int pageNumber)
{
return GetLatestContentPagedList(siteID, postType, bActiveOnly, pageSize, pageNumber, "", "");
}
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:4,代码来源:ContentPageHelper.cs
示例7: GetContentByDateRange
public List<ContentPage> GetContentByDateRange(Guid siteID, DateTime dateMidpoint, int iDayRange, ContentPageType.PageType pageType, bool? bActive, bool? bSiteMap, bool? bSiteNav, bool? bBlock)
{
//assiging SQL min dates because of 1753 vs 0001 year issues
DateTime dateBegin = (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue; //DateTime.MinValue;
DateTime dateEnd = (DateTime)System.Data.SqlTypes.SqlDateTime.MaxValue; //DateTime.MaxValue;
if (iDayRange > 0) {
dateBegin = dateMidpoint.AddDays(0 - iDayRange);
dateEnd = dateMidpoint.AddDays(iDayRange);
}
List<ContentPage> lstContent = CannedQueries.GetContentByStatusAndDateRange(db, siteID, pageType, dateBegin, dateEnd, bActive, bSiteMap, bSiteNav, bBlock).Select(ct => new ContentPage(ct)).ToList();
return lstContent;
}
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:15,代码来源:ContentPageHelper.cs
示例8: GetSitePageCount
public int GetSitePageCount(ContentPageType.PageType entryType)
{
using (CarrotCMSDataContext _db = CarrotCMSDataContext.GetDataContext()) {
int iCount = CannedQueries.GetAllByTypeList(_db, this.SiteID, false, entryType).Count();
return iCount;
}
}
开发者ID:mjohn,项目名称:CarrotCakeCMS,代码行数:7,代码来源:SiteData.cs
示例9: GetCommentsBySitePageNumber
public static List<PostComment> GetCommentsBySitePageNumber(Guid siteID, int iPageNbr, int iPageSize, string SortBy, ContentPageType.PageType pageType, bool? approved, bool? spam)
{
int startRec = iPageNbr * iPageSize;
using (CarrotCMSDataContext _db = CarrotCMSDataContext.GetDataContext()) {
IQueryable<vw_carrot_Comment> lstComments = (from c in CannedQueries.GetSiteContentCommentsByPostType(_db, siteID, pageType, approved, spam)
select c);
return PaginateComments(lstComments, iPageNbr, iPageSize, SortBy).ToList();
}
}
开发者ID:sunsiz,项目名称:CarrotCakeCMS,代码行数:10,代码来源:PostComment.cs
示例10: GetCommentCountBySiteAndType
public static int GetCommentCountBySiteAndType(Guid siteID, ContentPageType.PageType pageType, bool? approved, bool? spam)
{
using (CarrotCMSDataContext _db = CarrotCMSDataContext.GetDataContext()) {
return (from c in CannedQueries.GetSiteContentCommentsByPostType(_db, siteID, pageType, approved, spam)
select c).Count();
}
}
开发者ID:sunsiz,项目名称:CarrotCakeCMS,代码行数:7,代码来源:PostComment.cs
示例11: GetSitePageCount
public int GetSitePageCount(Guid siteID, ContentPageType.PageType entryType, bool bActiveOnly)
{
return _navHelper.GetSitePageCount(siteID, entryType, bActiveOnly);
}
开发者ID:mjohn,项目名称:CarrotCakeCMS,代码行数:4,代码来源:SiteNavHelper.cs
示例12: GetLatestContentPagedList
public List<SiteNav> GetLatestContentPagedList(Guid siteID, ContentPageType.PageType postType, bool bActiveOnly, int pageSize, int pageNumber)
{
return _navHelper.GetLatestContentPagedList(siteID, postType, bActiveOnly, pageSize, pageNumber);
}
开发者ID:mjohn,项目名称:CarrotCakeCMS,代码行数:4,代码来源:SiteNavHelper.cs
示例13: GetSitePageCount
public int GetSitePageCount(Guid siteID, ContentPageType.PageType entryType) {
return 50;
}
开发者ID:ithanshui,项目名称:CarrotCakeCMS-MVC,代码行数:3,代码来源:SiteNavHelperMock.cs
示例14: GetContentByStatusAndDateRange
internal static IQueryable<vw_carrot_Content> GetContentByStatusAndDateRange(CarrotCMSDataContext ctx, Guid siteID, ContentPageType.PageType pageType,
DateTime dateBegin, DateTime dateEnd, bool? bActive, bool? bSiteMap, bool? bSiteNav, bool? bBlock)
{
Guid gContent = ContentPageType.GetIDByType(ContentPageType.PageType.ContentEntry);
Guid gBlog = ContentPageType.GetIDByType(ContentPageType.PageType.BlogEntry);
Guid contentTypeID = ContentPageType.GetIDByType(pageType);
return (from ct in ctx.vw_carrot_Contents
orderby ct.ContentTypeValue, ct.NavMenuText
where ct.SiteID == siteID
&& ct.IsLatestVersion == true
&& ct.GoLiveDate >= dateBegin
&& ct.GoLiveDate <= dateEnd
&& (ct.ContentTypeID == contentTypeID || pageType == ContentPageType.PageType.Unknown)
&& (ct.PageActive == Convert.ToBoolean(bActive) || bActive == null)
&& (ct.BlockIndex == Convert.ToBoolean(bBlock) || bBlock == null)
&& ((ct.ShowInSiteMap == Convert.ToBoolean(bSiteMap) && ct.ContentTypeID == gContent) || bSiteMap == null)
&& ((ct.ShowInSiteNav == Convert.ToBoolean(bSiteNav) && ct.ContentTypeID == gContent) || bSiteNav == null)
select ct);
}
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:20,代码来源:CannedQueries.cs
示例15: GetSiteContentCommentsByPostType
internal static IQueryable<vw_carrot_Comment> GetSiteContentCommentsByPostType(CarrotCMSDataContext ctx, Guid siteID, ContentPageType.PageType contentEntry)
{
return (from r in ctx.vw_carrot_Comments
orderby r.CreateDate descending
where r.SiteID == siteID
&& r.ContentTypeID == ContentPageType.GetIDByType(contentEntry)
select r);
}
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:8,代码来源:CannedQueries.cs
示例16: GetRecentPagesOrPosts
private List<SyndicationItem> GetRecentPagesOrPosts(RSSFeedInclude feedData)
{
List<SyndicationItem> syndRSS = new List<SyndicationItem>();
List<SiteNav> lst = new List<SiteNav>();
ContentPageType PageType = new ContentPageType();
using (SiteNavHelper navHelper = new SiteNavHelper()) {
if (feedData == RSSFeedInclude.PageOnly || feedData == RSSFeedInclude.BlogAndPages) {
List<SiteNav> lst1 = navHelper.GetLatest(this.SiteID, 8, true);
lst = lst.Union(lst1).ToList();
List<SiteNav> lst2 = navHelper.GetLatestUpdates(this.SiteID, 10, true);
lst = lst.Union(lst2).ToList();
}
if (feedData == RSSFeedInclude.BlogOnly || feedData == RSSFeedInclude.BlogAndPages) {
List<SiteNav> lst1 = navHelper.GetLatestPosts(this.SiteID, 8, true);
lst = lst.Union(lst1).ToList();
List<SiteNav> lst2 = navHelper.GetLatestPostUpdates(this.SiteID, 10, true);
lst = lst.Union(lst2).ToList();
}
}
lst.RemoveAll(x => x.ShowInSiteMap == false && x.ContentType == ContentPageType.PageType.ContentEntry);
lst.RemoveAll(x => x.BlockIndex == true);
foreach (SiteNav sn in lst) {
SyndicationItem si = new SyndicationItem();
string sPageURI = RemoveDupeSlashesURL(this.ConstructedCanonicalURL(sn));
Uri PageURI = new Uri(sPageURI);
si.Content = new TextSyndicationContent(sn.PageTextPlainSummaryMedium);
si.Title = new TextSyndicationContent(sn.NavMenuText);
si.Links.Add(SyndicationLink.CreateSelfLink(PageURI));
si.AddPermalink(PageURI);
si.LastUpdatedTime = sn.EditDate;
si.PublishDate = sn.CreateDate;
syndRSS.Add(si);
}
return syndRSS.OrderByDescending(p => p.PublishDate).ToList();
}
开发者ID:mjohn,项目名称:CarrotCakeCMS,代码行数:45,代码来源:SiteData.cs
示例17: GetTemplateCounts
internal static Dictionary<string, float> GetTemplateCounts(CarrotCMSDataContext ctx, Guid siteID, ContentPageType.PageType pageType)
{
Guid contentTypeID = ContentPageType.GetIDByType(pageType);
return (from ct in ctx.vw_carrot_Contents.Where(c => c.SiteID == siteID && c.ContentTypeID == contentTypeID && c.IsLatestVersion == true)
group ct by ct.TemplateFile into grp
orderby grp.Count() descending
select new KeyValuePair<string, float>(grp.Key, (float)grp.Count()))
.ToDictionary(t => t.Key, t => t.Value);
}
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:10,代码来源:CannedQueries.cs
示例18: GetPagedSortedContent
public List<ContentPage> GetPagedSortedContent(Guid siteID, ContentPageType.PageType entryType, bool bActiveOnly, int pageSize, int pageNumber, string sSortParm) {
SortParm srt = new SortParm(sSortParm);
IQueryable<vw_carrot_Content> query1 = CannedQueries.GetAllByTypeList(db, siteID, bActiveOnly, entryType);
return PerformDataPagingQueryableContent(siteID, bActiveOnly, pageSize, pageNumber, srt.SortField, srt.SortDirection, query1);
}
开发者ID:ithanshui,项目名称:CarrotCakeCMS-MVC,代码行数:7,代码来源:ContentPageHelper.cs
示例19: GetPopularTemplateList
public Dictionary<string, float> GetPopularTemplateList(Guid siteID, ContentPageType.PageType pageType)
{
Dictionary<string, float> lstTemps = CannedQueries.GetTemplateCounts(db, siteID, pageType);
return lstTemps;
}
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:6,代码来源:ContentPageHelper.cs
示例20: GetCommentCountBySiteAndType
public static int GetCommentCountBySiteAndType(Guid siteID, ContentPageType.PageType pageType) {
using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
return (from c in CannedQueries.GetSiteContentCommentsByPostType(_db, siteID, pageType)
select c).Count();
}
}
开发者ID:ithanshui,项目名称:CarrotCakeCMS-MVC,代码行数:6,代码来源:PostComment.cs
注:本文中的Carrotware.CMS.Core.ContentPageType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论