zoukankan      html  css  js  c++  java
  • 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://www.kooboo.com/
    http://kooboo.codeplex.com/


    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://www.cloudera.com/content/cloudera/en/products/cdh.html
    http://dougmccune.com/blog/2007/03/23/why-i-dont-read-books/
    http://dongxicheng.org/
    http://hadoop.apache.org/
    http://incubator.apache.org/ambari/
    http://www.cnblogs.com/scotoma/archive/2013/05/18/3085248.html
    http://hortonworks.com/kb/get-started-setting-up-ambari/
    http://www.cnblogs.com/gpcuster/archive/2011/03/01/1968027.html
    http://stackoverflow.com/
    http://www.infoq.com/

    http://www.cnblogs.com/lwzz/archive/2013/05/22/3091922.html

  • 相关阅读:
    JQuery中的AJAX
    (十六)JQuery Ready和angularJS controller的运行顺序问题
    Excel自己定义纸张打印设置碰到无法对上尺寸的问题
    MVC整个样例的源代码
    将Image转化为BufferImage
    Graphics samples2
    Graphics samples
    please tell me the error about java Graphics
    获取网络资源大小
    java通过地址获取主机名
  • 原文地址:https://www.cnblogs.com/Leo_wl/p/3127267.html
Copyright © 2011-2022 走看看