Oussama Elkhadiri
Oussama Elkhadiri

Reputation: 13

Getting started with Piranha CMS

I Developed an ASP.Net MVC 5 application by using Visual Studio 2012. Now I want to integrate a .Net CMS in my project that supports MVC5, Web API and JSON responses, so I found that Piranha supports MVC 5, but I can't using it I want something good like tutorial to get started with, not the official web site.

Thanks.

Upvotes: 1

Views: 3940

Answers (1)

Håkan Edling
Håkan Edling

Reputation: 2753

Piranha CMS is just a NuGet-package and does not contain any special project features like scaffolding views or generating code for you in your project.

If you're interested in how it works, take a look at the template files that are installed when you install the PiranhaCMSMvc package, but in short:

  1. A request comes in with a permalink to a page or post
  2. The HttpModule gets the entry for the permalink and checks the Route that should be executed for the entry. The default route for pages is ~/page and for posts ~/posts.
  3. The MVC Controller for that route gets the request and loads the full model.
  4. If the controller is correctly implemented it respects the information added for the View in either the Page or Post type or the Page or Post and sends the model to that view.

The page/post types you create in Piranha CMS merely defines what data the model should have, it does not care what you do with it, or where it's sent.

This very loose coupling between the content and the application and its views is why you can integrate Piranha CMS into an already existing application and just use it to store the information you want be dynamic. It is also why there's no themes or pre-generated views for Piranha CMS.

I hope this clarifies usage the mindset of Piranha CMS a bit!

Regards

Håkan

Upvotes: 5

Related Questions