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.
Simple Web API controller for searching Piranha CMS and returning the results as JSON, for live searchs and other stuff.
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.
Example on how to list subpages taken from the official PiranhaCMS.org site documentation 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.
Example on how you could build a registration form for new Piranha CMS users with MVC for you site.
Example on how to limit the page types available for the different sites using the Hooks available in the core framework.
Extension method for getting the first paragraph in the main content that can be used when building post lists without an excerpt.
Example on how to manually load the latest post of a given post type and render them in the view.
A simple login form using the standard built in authentication mechanism of Piranha CMS.