您好,登錄后才能下訂單哦!
一個(gè)挺有意思的項(xiàng)目,跟拼圖一樣的創(chuàng)建網(wǎng)站,先來(lái)幾張GIF感受一下:
官方地址:http://www.zkea.net/zkeacms
下載地址:https://github.com/SeriaWei/ASP.NET-MVC-CMS/releases
GitHub:https://github.com/SeriaWei/ASP.NET-MVC-CMS
Git@OCS:http://git.oschina.net/seriawei/ASP.NET-MVC-CMS
演示地址:http://demo.zkea.net/
后臺(tái):http://demo.zkea.net/admin
用戶(hù)名,密碼:admin
ZKEACMS是基于EasyFrameWork,使用ASP.NET MVC4開(kāi)發(fā)的開(kāi)源CMS。
ZKEACMS一個(gè)內(nèi)容管理軟件(網(wǎng)站)。ZKEACMS不僅只是管理內(nèi)容,更是重新定義了布局、頁(yè)面和組件,讓用戶(hù)可以自由規(guī)劃頁(yè)面的布局,頁(yè)面和內(nèi)容。
ZKEACMS使用可視化編輯設(shè)計(jì),真正做到所見(jiàn)即所得,可直接在預(yù)覽頁(yè)面上設(shè)計(jì)頁(yè)面。
ZKEACMS采用插件式設(shè)計(jì),支持?jǐn)U展新插件。
架設(shè)環(huán)境:
Windows server 2003,IIS 6 或以上
MsSql 2005 或以上
.Net FrameWork 4.0,MVC 4
開(kāi)發(fā)環(huán)境
Microsoft VisualStudio 2013
Microsoft Sql Server 2005 以上
script("jQuery").Include("~/Scripts/jquery-1.11.2.min.js", "~/Scripts/jquery-1.11.2.min.js").RequiredAtHead(); script("bootStrap").Include("~/Content/bootstrap/js/bootstrap.js", "~/Content/bootstrap/js/bootstrap.min.js").RequiredAtFoot(); script("jQueryUi").Include("~/Scripts/jquery-ui/jquery-ui.js", "~/Scripts/jquery-ui/jquery-ui.min.js");
style("bootStrap").Include("~/Content/bootstrap/css/bootstrap.css", "~/Content/bootstrap/css/bootstrap.min.css").RequiredAtHead(); style("bootStrapTheme").Include("~/Content/bootstrap/css/bootstrap-theme.css", "~/Content/bootstrap/css/bootstrap-theme.min.css").RequiredAtHead(); style("Site").Include("~/Content/Site.css", "~/Content/Site.min.css").RequiredAtFoot();
這里是對(duì)腳本和樣式文件的定義,顯示調(diào)用RequiredAtHead()/RequiredAtFoot(),則無(wú)需主動(dòng)加到頁(yè)面中,默認(rèn)都會(huì)使用該資源文件,加到頁(yè)面的開(kāi)頭或者結(jié)尾。
Style.Reqiured("Site").AtHead(); Script.Reqiured("jQueryUi").AtFoot();
@using (Script.AtFoot()) { <script type="text/javascript"> function Create(xxx) { } </script> }
為什么需要這樣管理資源?因?yàn)閆KEACMS的頁(yè)面是由不同的組件構(gòu)成的,完全由用戶(hù)選擇在頁(yè)面中顯示什么組件,而不同的組件會(huì)需要不同的JS或CSS,因此需要?jiǎng)討B(tài)加載這些資源文件。
[DataConfigure(typeof(CarouselEntityMetaData))] public class CarouselEntity : EditorEntity { public long? ID { get; set; } public int? Height { get; set; } public List<CarouselItemEntity> CarouselItems { get; set; } } class CarouselEntityMetaData : DataViewMetaData<CarouselEntity> { protected override void DataConfigure() { DataTable("Carousel"); DataConfig(m => m.ID).AsIncreasePrimaryKey(); DataConfig(m => m.CarouselItems).Ignore(); } protected override void ViewConfigure() { ViewConfig(m => m.ID).AsHidden(); ViewConfig(m => m.CarouselItems).AsListEditor(); ViewConfig(m => m.Height).AsHidden(); } }
在視圖配置完以后(.AsTextBox(),.AsDropDownList()...) 直接調(diào)用EditorForModel即可自動(dòng)生成表單:
@Html.EditorForModel()
@( Html.Grid<ArticleEntity>().SetColumnTemplate(col => { col.Add(m => m.Title, "<a href='"+Url.Action("Edit")+"?ID={ID}'>{Title}</a>"); }).SetAsToolBar("#toolBar").ShowCheckbox(m=>m.ID).OrderBy(m=>m.PublishDate, OrderType.Descending) )
以前我們這樣寫(xiě):
[ViewDataArticleType]public override ActionResult Edit(ArticleEntity entity)
現(xiàn)在我們這樣寫(xiě):
Registry.Register<ArticleController, ViewDataArticleTypeAttribute>(m => m.Edit(null));
Service.Add(entity); Service.Count(m=>m.Id=1); Service.Delete(primaryKey); Service.Delete(m=>m.Id=1); Service.Get(primaryKey); Service.Get(m=>m.Id=1); ...
public class CarouselService : ServiceBase<CarouselEntity>{ }
。。。。。。
寫(xiě)得很簡(jiǎn)單,可是還有很多,有興趣的就下下來(lái)玩玩吧。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。