model view controller - How would you use ASP.NET MVC to create pages in a CMS? -
In a content management system, you can usually create pages that fly in
www.website.com .au / home.aspx
www.website.com.au/projects.aspx
www.website.com.au /contact-us.aspx
In the previous CMS we have written that when we have chosen to create a new page in our site, we have created these files physically on the disk. We have copied a new file from a base template page, changed the name of the file to name in the class
template_page.aspx and template_page.aspx.cs
has gone. Aspx and projects.aspx.cs
All this was done through our CMS application, no manual file is required by the user.
How will this approach use MVC?
For example, www.website.com.au/home/
www.website.com.au/projects/
www.website.com. Au / contact-us /
Maybe we need to dynamically create controller and view on the fly?
It seems to be from the old point of view, but I think its viable.
Can anyone think of it in a clever way?
You use a controller and some footage (display, create, edit) with a routing job Should be able to I did a simple simple implementation for a private project that went like this. I used this route near the top of my routing list and used the obligation to determine whether it should be treated as a static page with my rules. There was no hierarchy in my implementation, ie page / About / Contact - Only / Contact
Routes: routes. Marker ("Static content", "{title}", new {administrator = "page", verb = "description"}, new {title = new InvalidTitleContstraint ()}); Controller: Public class PageController: Administrator {// details checks if it can get a matching match in the DB / // redirects, then get a Public Public Action Result Details (String Title) // Get Public Actioncell () / Create / Create Public Public Functional (page page)}
Comments
Post a Comment