Why are my blocks not showing in Page Types - Compose Form - Add Form Control?
Permalink
I'd like to add some blocks to a page type, but only 7 are showing when I have many more. They show on the left-side of the screen when I click +, but not in the Add Form Control panel.
Please see attached pic.
Any ideas?
Thanks
Please see attached pic.
Any ideas?
Thanks
Thanks.
I created come custom blocks that do not have form.php. These are preset and don't have options so don't need a form.php. I just drag them on to a page and they pull in specific preset data.
What should I do in this case?
I created come custom blocks that do not have form.php. These are preset and don't have options so don't need a form.php. I just drag them on to a page and they pull in specific preset data.
What should I do in this case?
For blocks that don't have forms, I just put a blank composer.php file in the block's directory.
That seemed to work.
However, for some reason when I add new a block to a page type, pages that were created before the block was added do not update. Only pages created after the block has been added include the block.
Thought it might be an issue with caching but couldn't find anything.
Any ideas?
That seemed to work.
However, for some reason when I add new a block to a page type, pages that were created before the block was added do not update. Only pages created after the block has been added include the block.
Thought it might be an issue with caching but couldn't find anything.
Any ideas?
You need to click on the new block (in Page Defaults) and choose 'Setup on Child Pages' to select which old pages receive this new block.
@MrK...
I can't seem to find the "outputBlockEditModeEditor" function anywhere in the php code of 5.7.4. I tested it and I know it works but can't find the function. Any help?
I can't seem to find the "outputBlockEditModeEditor" function anywhere in the php code of 5.7.4. I tested it and I know it works but can't find the function. Any help?
@mhawke
You can find the outputBlockEditModeEditor() method in this file.
https://github.com/concrete5/concrete5/blob/develop/web/concrete/src...
It has not been included in the documentation or the API page yet.
You can find the outputBlockEditModeEditor() method in this file.
https://github.com/concrete5/concrete5/blob/develop/web/concrete/src...
It has not been included in the documentation or the API page yet.
Sorry, I need to search a newer version. Duh!
The blocks in the Add Form Control menu have a composer.php file. I believe you point to your current block form or create a special form for use in Composer.
An example of adding blocks to the Composer form that I've seen:
- create a file called composer.php in the block folder
- add this code to composer.php
- "form.php" is the file name of the form your block is using, it may have a different name
- the Composer Control block needs to be placed in the page type output before the block form will be available in Composer
Not all blocks can be added this way. For example, blocks that use the Redactor editor need to use the new embedding method.
https://www.concrete5.org/documentation/developers/5.7/interface-cus...