Why are my blocks not showing in Page Types - Compose Form - Add Form Control?
Please see attached pic.
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.
$editor = Core::make('editor'); echo $editor-> outputBlockEditModeEditor('content', $content); $editor = Core::make('editor'); echo $editor->outputStandardEditor('content', $content); outputStandardEditor() - does not have custom styles or concrete5 specific features - includes all enabled plugins outputBlockEditModeEditor() - includes custom styles - includes all enabled plugins
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?
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.
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?
You can find the outputBlockEditModeEditor() method in this file.
It has not been included in the documentation or the API page yet.