本文整理汇总了C#中Carrotware.CMS.Core.SiteData.CheckIsBlogEditorFolderPath方法的典型用法代码示例。如果您正苦于以下问题:C# SiteData.CheckIsBlogEditorFolderPath方法的具体用法?C# SiteData.CheckIsBlogEditorFolderPath怎么用?C# SiteData.CheckIsBlogEditorFolderPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Carrotware.CMS.Core.SiteData
的用法示例。
在下文中一共展示了SiteData.CheckIsBlogEditorFolderPath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBlogHeadingFromURL
public string GetBlogHeadingFromURL(SiteData currentSite, string sFilterPath)
{
string sTitle = String.Empty;
if (currentSite.CheckIsBlogCategoryPath(sFilterPath)) {
sTitle = "Category 1";
}
if (currentSite.CheckIsBlogTagPath(sFilterPath)) {
sTitle = "Tag 1";
}
if (currentSite.CheckIsBlogEditorFolderPath(sFilterPath)) {
sTitle = "Editor 1";
}
if (currentSite.CheckIsBlogDateFolderPath(sFilterPath)) {
sTitle = DateTime.UtcNow.ToString("MMMM yyyy");
}
if (currentSite.CheckIsSiteSearchPath(sFilterPath)) {
sTitle = "Search Results";
}
return sTitle;
}
示例2: GetFilteredContentPagedList
public List<ContentPage> GetFilteredContentPagedList(SiteData currentSite, string sFilterPath, bool bActiveOnly,
int pageSize, int pageNumber, string sortField, string sortDir)
{
IQueryable<vw_carrot_Content> query1 = null;
Guid siteID = currentSite.SiteID;
bool bFound = false;
if (currentSite.CheckIsBlogCategoryPath(sFilterPath)) {
query1 = CannedQueries.GetContentByCategoryURL(db, siteID, bActiveOnly, sFilterPath);
bFound = true;
}
if (currentSite.CheckIsBlogTagPath(sFilterPath)) {
query1 = CannedQueries.GetContentByTagURL(db, siteID, bActiveOnly, sFilterPath);
bFound = true;
}
if (currentSite.CheckIsBlogEditorFolderPath(sFilterPath)) {
query1 = CannedQueries.GetContentByUserURL(db, siteID, bActiveOnly, sFilterPath);
bFound = true;
}
if (currentSite.CheckIsBlogDateFolderPath(sFilterPath)) {
BlogDatePathParser p = new BlogDatePathParser(currentSite, sFilterPath);
query1 = CannedQueries.GetLatestBlogListDateRange(db, siteID, p.DateBeginUTC, p.DateEndUTC, bActiveOnly);
bFound = true;
}
if (!bFound) {
query1 = CannedQueries.GetLatestBlogList(db, siteID, bActiveOnly);
}
return PerformDataPagingQueryableContent(siteID, bActiveOnly, pageSize, pageNumber, sortField, sortDir, query1);
}
示例3: GetFilteredContentPagedCount
public int GetFilteredContentPagedCount(SiteData currentSite, string sFilterPath, bool bActiveOnly)
{
IQueryable<vw_carrot_Content> query1 = null;
Guid siteID = currentSite.SiteID;
bool bFound = false;
if (currentSite.CheckIsBlogCategoryPath(sFilterPath)) {
query1 = CannedQueries.GetContentByCategoryURL(db, siteID, bActiveOnly, sFilterPath);
bFound = true;
}
if (currentSite.CheckIsBlogTagPath(sFilterPath)) {
query1 = CannedQueries.GetContentByTagURL(db, siteID, bActiveOnly, sFilterPath);
bFound = true;
}
if (currentSite.CheckIsBlogEditorFolderPath(sFilterPath)) {
query1 = CannedQueries.GetContentByUserURL(db, siteID, bActiveOnly, sFilterPath);
bFound = true;
}
if (currentSite.CheckIsBlogDateFolderPath(sFilterPath)) {
BlogDatePathParser p = new BlogDatePathParser(currentSite, sFilterPath);
query1 = CannedQueries.GetLatestBlogListDateRange(db, siteID, p.DateBeginUTC, p.DateEndUTC, bActiveOnly);
bFound = true;
}
if (!bFound) {
query1 = CannedQueries.GetLatestBlogList(db, siteID, bActiveOnly);
}
return query1.Count();
}
示例4: GetBlogHeadingFromURL
public PageViewType GetBlogHeadingFromURL(SiteData currentSite, string sFilterPath)
{
Guid siteID = currentSite.SiteID;
PageViewType pvt = new PageViewType { ExtraTitle = "", CurrentViewType = PageViewType.ViewType.SinglePage, RawValue = null };
string sTitle = String.Empty;
if (currentSite.CheckIsBlogCategoryPath(sFilterPath)) {
pvt.CurrentViewType = PageViewType.ViewType.CategoryIndex;
vw_carrot_CategoryURL query = CompiledQueries.cqGetCategoryByURL(db, siteID, sFilterPath);
if (query != null) {
sTitle = query.CategoryText;
pvt.RawValue = query.CategoryText;
}
}
if (currentSite.CheckIsBlogTagPath(sFilterPath)) {
pvt.CurrentViewType = PageViewType.ViewType.TagIndex;
vw_carrot_TagURL query = CompiledQueries.cqGetTagByURL(db, siteID, sFilterPath);
if (query != null) {
sTitle = query.TagText;
pvt.RawValue = query.TagText;
}
}
if (currentSite.CheckIsBlogEditorFolderPath(sFilterPath)) {
pvt.CurrentViewType = PageViewType.ViewType.AuthorIndex;
vw_carrot_EditorURL query = CompiledQueries.cqGetEditorByURL(db, siteID, sFilterPath);
if (query != null) {
ExtendedUserData usr = new ExtendedUserData(query.UserId);
sTitle = usr.ToString();
pvt.RawValue = usr;
}
}
if (currentSite.CheckIsBlogDateFolderPath(sFilterPath)) {
pvt.CurrentViewType = PageViewType.ViewType.DateIndex;
BlogDatePathParser p = new BlogDatePathParser(currentSite, sFilterPath);
TimeSpan ts = p.DateEndUTC - p.DateBeginUTC;
pvt.RawValue = p.DateBegin;
int daysDelta = ts.Days;
if (daysDelta < 400 && daysDelta > 90) {
sTitle = p.DateBegin.ToString("yyyy");
pvt.CurrentViewType = PageViewType.ViewType.DateYearIndex;
}
if (daysDelta < 36 && daysDelta > 3) {
sTitle = p.DateBegin.ToString("MMMM yyyy");
pvt.CurrentViewType = PageViewType.ViewType.DateMonthIndex;
}
if (daysDelta < 5) {
sTitle = p.DateBegin.ToString("MMMM d, yyyy");
pvt.CurrentViewType = PageViewType.ViewType.DateDayIndex;
}
}
if (currentSite.CheckIsSiteSearchPath(sFilterPath)) {
pvt.CurrentViewType = PageViewType.ViewType.SearchResults;
string sSearchTerm = "";
if (HttpContext.Current.Request.QueryString[SiteData.SearchQueryParameter] != null) {
sSearchTerm = HttpContext.Current.Request.QueryString[SiteData.SearchQueryParameter].ToString();
}
pvt.RawValue = sSearchTerm;
sTitle = string.Format(" '{0}' ", sSearchTerm);
}
pvt.ExtraTitle = sTitle;
return pvt;
}
示例5: GetBlogHeadingFromURL
public string GetBlogHeadingFromURL(SiteData currentSite, string sFilterPath)
{
Guid siteID = currentSite.SiteID;
string sTitle = String.Empty;
if (currentSite.CheckIsBlogCategoryPath(sFilterPath)) {
vw_carrot_CategoryURL query = CompiledQueries.cqGetCategoryByURL(db, siteID, sFilterPath);
sTitle = query.CategoryText;
}
if (currentSite.CheckIsBlogTagPath(sFilterPath)) {
vw_carrot_TagURL query = CompiledQueries.cqGetTagByURL(db, siteID, sFilterPath);
sTitle = query.TagText;
}
if (currentSite.CheckIsBlogEditorFolderPath(sFilterPath)) {
vw_carrot_EditorURL query = CompiledQueries.cqGetEditorByURL(db, siteID, sFilterPath);
ExtendedUserData usr = new ExtendedUserData(query.UserId);
sTitle = usr.ToString();
}
if (currentSite.CheckIsBlogDateFolderPath(sFilterPath)) {
BlogDatePathParser p = new BlogDatePathParser(currentSite, sFilterPath);
TimeSpan ts = p.DateEndUTC - p.DateBeginUTC;
int daysDelta = ts.Days;
if (daysDelta > 90) {
sTitle = "Year " + p.DateBegin.ToString("yyyy");
}
if (daysDelta < 36) {
sTitle = p.DateBegin.ToString("MMMM yyyy");
}
if (daysDelta < 5) {
sTitle = p.DateBegin.ToString("MMMM d, yyyy");
}
}
if (currentSite.CheckIsSiteSearchPath(sFilterPath)) {
sTitle = "Search Results";
}
return sTitle;
}