A Concrete5 package that contains a complete working example of a dashboard interface for viewing, editing, adding, and deleting database records (a.k.a. "CRUD"). The data is entirely self-contained in this package... it is not related to any site content (pages, blocks, etc.). In a real-world website, you would have your admin users work with this data in the dashboard, then integrate it yourself with the site content (usually via single_pages or custom blocks).
A high-level explanation is provided below in this README, and the code is commented to explain why things are the way they are. That being said, it might be difficult to understand if you aren't already familiar with other MVC frameworks such as Rails, Kohana, Symfony, CodeIgniter, etc.
_Note that there is an older version of this code which contains less functionality, but is (arguably) easier to understand. You can access that older version by browsing or downloading the "old-style" tag here: https://github.com/jordanlev/c5_boilerplate_crud/tags ._
single_pages
), unlike most C5 examples out there which tie one view (single_page
) to one controllerThe data models a very basic car dealership inventory. The primary entity is Car
, each of which has a Body Type
(many-to-one relationship), a Manufacturer
(many-to-one relationship), and several Colors
(many-to-many relationship).
There is one dummy controller at the top-level to serve as a placeholder in the dashboard (so we get a top-level dashboard section for our interface). Below that are two controllers -- one for the primary entity (Cars), one for the "lookup list" data (Body Types, Manufacturers, and Colors).
The list of Car records is segmented by Body Type (which acts as a "category" for Cars), so admin users must choose a Body Type before viewing the list of Cars.
The list of Body Types (in the "Misc. Settings" section) can be sorted via drag-and-drop.
A very basic blocktype and a sample front-end single_page
are provided as a starting points -- but they do not contain much functionality (because the purpose of this package is to show an example of the back-end dashboard interface).