How do you edit a Designer Content block?
Permalink Browser Info Environment
Hi There,
We've made a designer content block but now the client want's to change on of the fields to an image field.
Sorry if this is simple but we can't figure it out - how do you do edit a Designer Content block?
Cheers
Ben
We've made a designer content block but now the client want's to change on of the fields to an image field.
Sorry if this is simple but we can't figure it out - how do you do edit a Designer Content block?
Cheers
Ben
Type: | Discussion |
---|---|
Status: | In Progress |
Thanks mate - will have a go.
So I guess I need to change it in a couple of places right?
- The entry template (is that called edit.php?)
- The output template
Is there anything that needs to be done in the database?
And can I just copy and paste code from a different image and rename it?
- The entry template (is that called edit.php?)
- The output template
Is there anything that needs to be done in the database?
And can I just copy and paste code from a different image and rename it?
Depends on which kind of field(s) you want to add -- you might need to alter every file. If you're not familiar with how C5 blocks work, it might be a bit complicated, but in general you need to modify these files:
edit.php -- the block edit form that users enter content into
view.php -- the template that displays the block html out on the page
db.xml -- the database schema definition containing all the fields
controller.php -- most of the functional code, basically does data preparation so the view.php file doesn't have to have a bunch of ugly code in it
How much content has already been entered with this custom block? It might be easier to create a new block and transfer everything over to that.
edit.php -- the block edit form that users enter content into
view.php -- the template that displays the block html out on the page
db.xml -- the database schema definition containing all the fields
controller.php -- most of the functional code, basically does data preparation so the view.php file doesn't have to have a bunch of ugly code in it
How much content has already been entered with this custom block? It might be easier to create a new block and transfer everything over to that.
Hi, I have created a block on Designer content package, which have a WYSIWYG editor, which work perfectly but the block in edit mode create new record in database i.e: not replace the existing record which i want to edit/update.
So what to do with this problem. Thanks.
So what to do with this problem. Thanks.
I believe this was addressed in another forum thread:
http://www.concrete5.org/community/forums/customizing_c5/check-it-o...
http://www.concrete5.org/community/forums/customizing_c5/check-it-o...
I like this a lot, and I will have good use of it for most of my clients. But do you have any plans of making an "edit block" function?
Best regards
Fredrik
Best regards
Fredrik
No, I have no plans for this -- you will need to modify the generated block's code as described above.
Implementing a dashboard interface for editing existing block types is an order of magnitude more complicated than creating them in the first place, and I don't see the benefit being worth the immense amount of work involved (especially since there already is a way to achieve this -- by working with the code directly).
Sorry.
-Jordan
Implementing a dashboard interface for editing existing block types is an order of magnitude more complicated than creating them in the first place, and I don't see the benefit being worth the immense amount of work involved (especially since there already is a way to achieve this -- by working with the code directly).
Sorry.
-Jordan
No worries =)
I was just curious.
Thanks for the fast reply!
I was just curious.
Thanks for the fast reply!
Thanks - this helped me tremendously!
-Jordan