Getting Block data from database

Permalink
Hello everyone,
First of all I am new to C5 and am enjoying it so far. However I am trying to alter the content block on my site that ships with C5 to add some extra functionality/data fields to it. I have already edited the db table to hold the extra data and confirmed that the effects were taken. The issue I'm having is populating the new input fields with the data from the database when I go to edit the block? Can someone help me with this or point me toward some documentation that might help. (I have read most of the c5.com documentation already)

Thanks in advance!

 
mesuva replied on at Permalink Reply
mesuva
Instead of editing the content block to have new fields, I'd suggest creating a new, separate block.

From what you've described, you could quickly develop what you want using the 'Designer Content' package:
http://www.concrete5.org/marketplace/addons/designer-content/...
You can use this generate a new block with whatever fields you want (including WYSIWYG fields like the content block). After it's been built, you can then tweak the output (the view.php) however you like.

The other thing to consider is whether your content block actually needs extra fields, or whether the page itself is what needs them. If it could be the latter, you should explore custom page attributes and the composer.
wworsley2 replied on at Permalink Reply
Thanks for the post. I really like those features and I think that page attributes would be the answer for me in this particular case because I want everything on the page to be editable by my client from one location. So that is why I wanted to go with a custom block type. But I went ahead and created my own rather than editing the Content block type. It was fairly simple it is just there doesn't seem to be much documentation on what exactly is inherited from the BaseController class. Anyway the custom block worked out and I was very easily able to save and pull data from the DB. Thanks so much for the help though.