Database Driven Pages

Permalink 1 user found helpful
I have a client who wants to manage a potentially large amount of records, displaying it on the site as a table. This will be about 100 rows to begin with, each containing 5 columns of information - a text field for Title, then 4 columns each to contain (a link to) a PDF file. The page will display the data ordered by the Title column.

If there were only 20 or so records, I'd probably just create a custom block type and get him to re-order the blocks manually each time he adds something new. However, this is phase one of a larger project where there may be 1000 records, which means I will need to add functionality to filter and sort the data too, so I want to start it off in the right direction and build a database driven system.

What I need advice on doing is how to add a dashboard page to add/edit/delete the current records, then I need to figure out how to display them on the website. If there is a 'Data Manager' type add-on, I'd buy that and modify it to meet my particular needs, but I'd prefer to know how to build it from scratch.

Any help or advice would be much appreciated.

juliandale
 
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
One add-on that seems the closest to what you're trying to do would be the "Tables" addon. It includes a dashboard builder area.

http://www.concrete5.org/marketplace/addons/tables/...

I'm thinking you could build a custom template that uses a jquery filter of some sort, for the sorting functionality.

Hope this helps.
juliandale replied on at Permalink Reply
juliandale
Thanks for the quick reply, though I'm not sure that add-on would be enough for what I need. I have worked with JQuery table sorting/filtering before and it is useful, but when there are 1000 records the page would have to load them all before the JQuery filtering would take place, making the page very slow loading. A database driven solution would be much faster as I would be able to load just a selection of the results (for example using a querystring parameter to adjust the query, or through a proper search/filter form).

Also, if there were linked records, a single table based solution wouldn't work. I'd like to start off with just a one table database system, then once I have figured that out, I'll be ready to build more complex data driven systems.
mhawke replied on at Permalink Best Answer Reply
mhawke
If you truly want to build your own, this free package is a good place to start to learn how to build an interface to the database:

http://www.concrete5.org/marketplace/addons/custom-objects-demo/...

There is also a 'CRUD Boilerplate' package developed by jordanlev who is a well respected member of the C5 community

https://github.com/jordanlev/c5_boilerplate_crud...
juliandale replied on at Permalink Reply
juliandale
Thanks mhawke, that looks just like what I was after!