Search code examples
piranha-cms

How to customize the page?


I'm attempting to customize the Piranha CMS system. I'm interested in changing the layout, setting up my own styled menu and tweaking where the content on the page shows up.

Is the intent that I modify the _Layout.cshtml file to my liking?

If there's a page in the documentation that covers this, please helpfully provide the link. :)


Solution

  • Piranha CMS is just a framework for content management, not a website template with widgets, themes and stuff like that :) With that said, a basic Piranha CMS project is basically a standard MVC project with two included controllers, one that loads the model for a requested page, and one that loads the model for a requested post.

    This means you can do anything that you can do with any normal MVC application when it comes to styling and modification.

    There exists some helpers for rendering Menus, Breadcrumbs and so on. Documentation for the helpers can found here:

    For the helper methods that render html there are hooks for overriding all content rendered so that you can change the standard menu to your own style of html if you need. Documentation for the hooks available can be found here:

    Regarding what can be achieved with Page types and creating templates with different regions you can check the following pages:

    I hope this helps you a bit.

    Regards!

    Håkan