Gists


When we get questions on how to implement different kind of things with Piranha CMS we try to remember to post the solutions as Gists on GitHub. This section is a collection of the different Gists available and a short description on them, hopefully you can find some tips & tricks here.

Web API Search

Simple Web API controller for searching Piranha CMS and returning the results as JSON, for live searchs and other stuff.


Written by: Håkan Edling. Last updated: 2015-03-26 Read more

Extension filter

This Gist shows how to filter the available post extensions depending on post type to make sure that your extension is only available for relevant types.


Written by: Håkan Edling. Last updated: 2013-10-18 Read more

Subpage listing

Example on how to list subpages taken from the official PiranhaCMS.org site documentation pages.


Written by: Håkan Edling. Last updated: 2013-10-18 Read more

Composite pages

Short helper method that can be used to update and invalidate a page from the server side cache when a related entity is updated or deleted.


Written by: Håkan Edling. Last updated: 2013-10-18 Read more

Create user

Example on how you could build a registration form for new Piranha CMS users with MVC for you site.


Written by: Håkan Edling. Last updated: 2013-10-16 Read more

Filter page types for sites

Example on how to limit the page types available for the different sites using the Hooks available in the core framework.


Written by: Håkan Edling. Last updated: 2013-10-16 Read more

Get first post paragraph

Extension method for getting the first paragraph in the main content that can be used when building post lists without an excerpt.


Written by: Håkan Edling. Last updated: 2013-10-16 Read more

Get the latest posts

Example on how to manually load the latest post of a given post type and render them in the view.


Written by: Håkan Edling. Last updated: 2013-10-16 Read more

Simple login form

A simple login form using the standard built in authentication mechanism of Piranha CMS.