ASP. NET MVC Open Source Station system ZKEACMS recommendation, from this site "spell" up

Source: Internet
Author: User
Tags microsoft sql server 2005 open source cms

A very interesting project, like a jigsaw puzzle to create a website, first a few gif to feel:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7F/B6/wKioL1cqF1rQ5ThIAAjlfuqzxIU341.gif "style=" float: none; "title=" 1.gif "alt=" Wkiol1cqf1rq5thiaajlfuqzxiu341.gif "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7F/B8/wKiom1cqFprjzd0-AB5JYEYjr_4504.gif "style=" float: none; "title=" 2.gif "alt=" Wkiom1cqfprjzd0-ab5jyeyjr_4504.gif "/>

650) this.width=650; "src=" Http://ww1.sinaimg.cn/mw690/005zTNGqgw1f3afozownpg30dw09nx6q.gif "style=" width:500px; height:347px; "title=" "width=" "height=" 347 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" 005ztngqgw1f3afozownpg30dw09nx6q.gif "/>


Official address: Http://www.zkea.net/zkeacms

: https://github.com/SeriaWei/ASP.NET-MVC-CMS/releases

Github:https://github.com/seriawei/asp.net-mvc-cms

[Email Protected]:http://git.oschina.net/seriawei/asp.net-mvc-cms

Demo Address: http://demo.zkea.net/

Backstage: Http://demo.zkea.net/admin

User name, Password: admin

Zkeacms is an open source CMS based on Easyframework, which is developed using ASP. NET MVC4.

Zkeacms A Content Management software (website). Zkeacms not only manages content, it also redefined layouts, pages, and components, allowing users to freely plan the layout, page and content of their pages.

Zkeacms uses a visual editing design to really get what you see, and you can design the page directly on the preview page.

The ZKEACMS incorporates a plug-in design that supports the expansion of new plugins.

Erection Environment:

Windows Server 2003,iis 6 or later

MSSQL 2005 or above

. Net FrameWork 4.0,MVC 4

Development environment

Microsoft VisualStudio 2013

More than Microsoft SQL Server 2005

About the characteristics of the project everyone to go to the official website to see, here is the main talk about code: resource Management and Application (JS/CSS): resource definition

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 ();

Here is the definition of the script and the style file, the display call Requiredathead ()/requiredatfoot (), you do not have to actively add to the page, by default will use the resource file, added to the beginning or end of the page.

Use of resources (. cshtml):
Style.reqiured ("Site"). Athead (); Script.reqiured ("jQueryUI"). Atfoot ();

@using (Script.atfoot ()) {<script type= "Text/javascript" > Function Create (XXX) {} </script>}

650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "style=" Margin:0px;float:left; Border:none; "/>

Why do you need to manage resources like this? Because ZKEACMS pages are made up of different components, it is entirely up to the user to choose what components to display on the page, and different components will require different JS or CSS, so they need to be loaded dynamically.

Simple data and view configuration (meta-data registration):

    [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 ();         }    } 

Edit page directly using Editorformodel:

After the view configuration is finished (. Astextbox (),. Asdropdownlist () ... You can automatically generate a form by calling Editorformodel directly:

@Html. Editorformodel ()
List page:
@ (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). (M=>m.publishdate, ordertype.descending))
Filterconfig:

We used to write this:

[Viewdataarticletype]public override ActionResult Edit (articleentity entity)

Now let's write this:

Registry.register<articlecontroller, viewdataarticletypeattribute> (m = M.edit (null));
Flexible service

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);

The implementation is so simple:
public class carouselservice:servicebase<carouselentity>{}

。。。。。。

The writing is very simple, but there are many, interested in the next down to play it.


This article is from the "Zkeasoft" blog, make sure to keep this source http://zkeasoft.blog.51cto.com/3760249/1770222

ASP. NET MVC Open Source Station system ZKEACMS recommendation, from this site "spell" up

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.