Duplicate flex block | API plugin

Posted in: Newspaper
Post count: 12

I would like to make a custom flex block, which based on Flex Block 1.
I tried to make it with API plugins. Added the modules (copied Flex Block 1 with some changes), and the block

This is only a snippet, what changes from the original code:

td_api_block::add( 'td_flex_block_1_custom',
		    array(
		        'map_in_visual_composer' => false,
		        'map_in_td_composer'     => true,
		        "name"                   => 'Flex Block 1 - custom',
		        "base"                   => 'td_flex_block_1_custom',
		        "class"                  => 'td_flex_block_1_custom',
		        "controls"               => "full",
		        "category"               => 'Blocks',
		        'tdc_category'           => 'Blocks',
		        'icon'                   => 'icon-pagebuilder-td_flex_block_1',
		        'file'                   => $this->plugin_path . '/shortcodes/td_flex_block_1_custom.php',

But after recieved an php error message:

 Fatal error: Uncaught Error: Call to undefined method td_api_plugin::get_map_block_general_array()
in ..../td-api-plugin/td-api-plugin.php on line 670

Line 670:
self::get_map_block_general_array(),

Could you help to setup?

Thanks

Post count: 27744

Hello,

I recommend you use the option to create your own modules with tagdiv Composer https://forum.tagdiv.com/modules-builder-newspaper-theme/ , and after you can assign them in Flex Block Builder, or Flex Block Loop -> https://forum.tagdiv.com/flex-block-builder-flex-loop-builder/

Thank you!

Post count: 12

Thank you for your answer.
I would like to change the date position. With API plugin i found the solution, but work only with update module, as i wrote can not add new flex block.
Could i change it with the flex block builder? (As i see i with this option can add only pre-made modules, i would like to add my custom.)

Post count: 27744

Hello,

Yes, you can do it using the modules builder and assign the module to the flex block builder.
You can import a blank template and design as you want.

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.