好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

KooBoo CMS 1

KooBoo CMS 1

Kooboo CMS分页

<h1>
    @("Fabrikam News".Label())
</h1>
<hr />

@{
    var key = Page_Context.Current.PageRequestContext.AllQueryString["key"];
    var strPageIndex = Page_Context.Current.PageRequestContext.AllQueryString["pageIndex"];
    var pageIndex =1;
    if (!string.IsNullOrEmpty(strPageIndex))
    {
        int.TryParse(strPageIndex,out pageIndex);
    }

    
}


@foreach (var item in ViewBag.News){
    <div>
        
        <h2>
            @Html.FrontHtml().PageLink(item.title, "news/detail", new { UserKey = item.UserKey }, new { title = item.title })
        </h2>
        <p class="news-date">
            @item.UtcCreationDate.ToString("dd/MM/yyyy hh:mm:ss")
        </p>
        <p>
            @item.Summary
        </p>
        @Html.FrontHtml().PageLink("Read more".Label(), "news/detail", new { UserKey = item.UserKey }, new { @class = "arrow_left" })
        <hr />
    </div>
}
@{
    var pageOption = new PagerOptions
    {
        NextPageText = "下一页 ?",
        PrevPageText = "? 上一页",
        CssClass="pagination",
        CurrentPagerItemWrapperFormatString="<span class=\"current\">{0}</span>",
        NavigationPagerItemWrapperFormatString="<span class=\"pagenavigation\">{0}</span>"
    };
}
@Html.FrontHtml().Pager(ViewBag.News,pageOption)

分页属性:

        public PagerOptions()
        {
            AutoHide = true;
            PageIndexParameterName = "page";
            NumericPagerItemCount = 10;
            AlwaysShowFirstLastPageNumber = false;
            ShowPrevNext = true;
            PrevPageText = "<";
            NextPageText = ">";
            ShowNumericPagerItems = true;
            ShowFirstLast = false;
            FirstPageText = "First";
            LastPageText = "Last";
            ShowMorePagerItems = true;
            MorePageText = "...";
            ShowDisabledPagerItems = true;
            SeparatorHtml = "&nbsp;&nbsp;";
            UseJqueryAjax = false;
            ContainerTagName = "div";
            ShowPageIndexBox = false;
            ShowGoButton = true;
            PageIndexBoxType = PageIndexBoxType.TextBox;
            MaximumPageIndexItems = 80;
            GoButtonText = "Go";
            ContainerTagName = "div";
            InvalidPageIndexErrorMessage = "Invalid page index";
            PageIndexOutOfRangeErrorMessage = "Page index out of range";
            CurrentPagerItemWrapperFormatString = "<a class=\"current\">{0}</a>";
            StatisticsTextFormatString = "<span><strong>{0}</strong>-<strong>{1}</strong> of <strong>{2}</strong></span>";
        }

在新闻的Article.Detail中怎么调用它的Category呢

首先在News.NewsListByCategory 中接收类别

@Html.FrontHtml().PageLink("Read more".Label(), "news/detail", new { UserKey = item.UserKey,Category=Page_Context.Current.PageRequestContext.AllQueryString["UserKey"] }, new { @class = "arrow_left" })

然后在 News.Detail 中接收并输出类别

@Page_Context.Current.PageRequestContext.AllQueryString["Category"]

图片链接

      @{
      var imgurl=Url.Content(item.Thumbnail??"");
          }
      @Html.FrontHtml().PageLink(Html.Raw("<img alt='"+item.Title+"' src='"+imgurl+"' />"), "Product/detail", new { UserKey = item.UserKey});


ReSharp:
name:User
key:D9d09DSYJel9IyuDU4btAQwZcbLugUad


http://HdhCmsTestkooboo测试数据/
http://kooboo.codeplex测试数据/


1.Top choice for multilingual websites
Manage multiple websites from just one location.
Content and programs are accessible from all sites.
Complete control of content flow and program sharing.
2.Ecommerce, marketing and profiling
Built-in Ecommerce functionality to start selling in 5 minutes.
Best proprietary downloadable email marketing software.
Complete user profile analysis.
3.Thousands of multinational websites
Free and open source enterprise level CMS.
Used by some of the world's largest companies.
Cheaptickets, Grolsch, Albelli and more.
4.Virtually no learning curve
Conforms to universally accepted practices in web development
Spend just 10 minutes learning to develop your first website
Easily convert existing MVC websites into Kooboo modules

hadoop:
http://HdhCmsTestcloudera测试数据/content/cloudera/en/products/cdh.html
http://dougmccune测试数据/blog/2007/03/23/why-i-dont-read-books/
http://dongxicheng.org/
http://hadoop.apache.org/
http://incubator.apache.org/ambari/
http://HdhCmsTestcnblogs测试数据/scotoma/archive/2013/05/18/3085248.html
http://hortonworks测试数据/kb/get-started-setting-up-ambari/
http://HdhCmsTestcnblogs测试数据/gpcuster/archive/2011/03/01/1968027.html
http://stackoverflow测试数据/
http://HdhCmsTestinfoq测试数据/

http://HdhCmsTestcnblogs测试数据/lwzz/archive/2013/05/22/3091922.html

作者: Leo_wl

    

出处: http://HdhCmsTestcnblogs测试数据/Leo_wl/

    

本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

版权信息

查看更多关于KooBoo CMS 1的详细内容...

  阅读:45次