Esempio n. 1
0
 public static void ReplacePageElementsInChannelPage(StringBuilder parsedBuilder, PageInfo pageInfo, List <string> labelList, int nodeId, int currentPageIndex, int pageCount, int totalNum)
 {
     //替换分页模板
     foreach (var labelString in labelList)
     {
         if (StlParserUtility.IsSpecifiedStlElement(labelString, StlPageItems.ElementName))
         {
             var stlElement = labelString;
             var pageHtml   = StlPageElementParser.ParseStlPageInChannelPage(stlElement, pageInfo, nodeId, currentPageIndex, pageCount, totalNum);
             parsedBuilder.Replace(StlPageItems.Translate(stlElement), pageHtml);
         }
         else if (StlParserUtility.IsSpecifiedStlElement(labelString, StlPageItem.ElementName))
         {
             var stlElement = labelString;
             var pageHtml   = StlPageElementParser.ParseStlPageItemInChannelPage(stlElement, pageInfo, nodeId, currentPageIndex, pageCount, totalNum);
             parsedBuilder.Replace(stlElement, pageHtml);
         }
     }
 }
Esempio n. 2
0
 public async Task <string> ParseStlPageInDynamicPageAsync(string stlElement, int currentPageIndex, int pageCount, int totalNum, bool isPageRefresh, string ajaxDivId)
 {
     return(await StlPageItems.ParseInDynamicPageAsync(this, stlElement, currentPageIndex, pageCount, totalNum, isPageRefresh, ajaxDivId));
 }
Esempio n. 3
0
 public async Task <string> ParseStlPageInSearchPageAsync(string stlElement, string ajaxDivId, int channelId, int currentPageIndex, int pageCount, int totalNum)
 {
     return(await StlPageItems.ParseInSearchPageAsync(this, stlElement, ajaxDivId, channelId, currentPageIndex, pageCount, totalNum));
 }
Esempio n. 4
0
 //在栏目页中对“翻页项容器”(stl:pageItems)元素进行解析,此元素在生成页面时单独解析,不包含在ParseStlElement方法中。
 public async Task <string> ParseStlPageInChannelPageAsync(string stlElement, int channelId, int currentPageIndex, int pageCount, int totalNum)
 {
     return(await StlPageItems.ParseAsync(this, stlElement, channelId, 0, currentPageIndex, pageCount, totalNum, ParseType.Channel));
 }
Esempio n. 5
0
 //在内容页中对“翻页项容器”(stl:pageItems)元素进行解析,此元素在生成页面时单独解析,不包含在ParseStlElement方法中。
 public async Task <string> ParseStlPageInContentPageAsync(string stlElement, int channelId, int contentId, int currentPageIndex, int pageCount)
 {
     return(await StlPageItems.ParseAsync(this, stlElement, channelId, contentId, currentPageIndex, pageCount, pageCount, ParseType.Content));
 }
Esempio n. 6
0
 public static string ParseStlPageInDynamicPage(string stlElement, PageInfo pageInfo, string pageUrl, int channelId, int currentPageIndex, int pageCount, int totalNum, bool isPageRefresh, string ajaxDivId)
 {
     return(StlPageItems.ParseInDynamicPage(stlElement, pageInfo, pageUrl, channelId, currentPageIndex, pageCount, totalNum, isPageRefresh, ajaxDivId));
 }
Esempio n. 7
0
 public static string ParseStlPageInSearchPage(string stlElement, PageInfo pageInfo, string ajaxDivId, int channelId, int currentPageIndex, int pageCount, int totalNum)
 {
     return(StlPageItems.ParseInSearchPage(stlElement, pageInfo, ajaxDivId, channelId, currentPageIndex, pageCount, totalNum));
 }
Esempio n. 8
0
 //在栏目页中对“翻页项容器”(stl:pageItems)元素进行解析,此元素在生成页面时单独解析,不包含在ParseStlElement方法中。
 public static string ParseStlPageInChannelPage(string stlElement, PageInfo pageInfo, int channelId, int currentPageIndex, int pageCount, int totalNum)
 {
     return(StlPageItems.Parse(stlElement, pageInfo, channelId, 0, currentPageIndex, pageCount, totalNum, EContextType.Channel));
 }
Esempio n. 9
0
 //在内容页中对“翻页项容器”(stl:pageItems)元素进行解析,此元素在生成页面时单独解析,不包含在ParseStlElement方法中。
 public static string ParseStlPageInContentPage(string stlElement, PageInfo pageInfo, int channelId, int contentId, int currentPageIndex, int pageCount)
 {
     return(StlPageItems.Parse(stlElement, pageInfo, channelId, contentId, currentPageIndex, pageCount, pageCount, EContextType.Content));
 }