Adding new block - custom block - best solution?
Permalink
Hi guys,
I am relatively new to Concrete 5 and have a question regarding a layout and the best solution to achieve it. Please see screenshot attached.
I would like to create a section where the admin can add new blocks (snippet red outline). My guess is, to create a Block Area with $a->setBlockLimit(99); to allow multiple additions of a block pr area. My other guess is, that I have to create a custom block for the red outlined item containing somehow the 3 areas (headline, thumb and a wysiwyg editor) - I don't want to use the HTML block and don't think the Content Area block is right for it as it strips out markup. Is creating a custom block the best approach for it?
If yes, well.. what's the best way to create such a custom block?
Thanks in advance
I am relatively new to Concrete 5 and have a question regarding a layout and the best solution to achieve it. Please see screenshot attached.
I would like to create a section where the admin can add new blocks (snippet red outline). My guess is, to create a Block Area with $a->setBlockLimit(99); to allow multiple additions of a block pr area. My other guess is, that I have to create a custom block for the red outlined item containing somehow the 3 areas (headline, thumb and a wysiwyg editor) - I don't want to use the HTML block and don't think the Content Area block is right for it as it strips out markup. Is creating a custom block the best approach for it?
If yes, well.. what's the best way to create such a custom block?
Thanks in advance
Hi MrKDilkington,
thanks for the great break down - I will be definitely try it out.
I found however an AddOn which does exactly what is required - Block Designer.
I was battling for a bit with the AddOn installation but got there at the end and was also battling a bit with Site permissions as I was not aware that the SuperUser has more permissions than Admin Users. But the AddOn works and it's worth the license cost.
Thanks for your answer again.
thanks for the great break down - I will be definitely try it out.
I found however an AddOn which does exactly what is required - Block Designer.
I was battling for a bit with the AddOn installation but got there at the end and was also battling a bit with Site permissions as I was not aware that the SuperUser has more permissions than Admin Users. But the AddOn works and it's worth the license cost.
Thanks for your answer again.
A basic approach would be to combine custom layouts and a custom block.
The custom layout could be used to add area columns to place the custom block.
https://documentation.concrete5.org/editors/in-page-editing/block-ar...
The custom block could be broken down into pieces:
- a text input for the headline
- image selector for the PDF image
- textarea or rich text editor for the main text
- file selector for the PDF link
I recommend reading the documentation related to blocks.
https://documentation.concrete5.org/developers/working-with-blocks...
The default Testimonial block would be a good example to learn from. It includes a text input, textarea, and an image selector.