-
AuthorPosts
-
December 22, 2013 at 4:22 pm #203060
I’d like to add my own custom content and media objects to the page builder. Is there any documentation to support this effort? If not, can you provide some general guidelines to accomplish this? I’m sure I can muddle my way through and figure it out, but a little nudge in the right direction would be a tremendous benefit.
December 23, 2013 at 10:23 am #203225Hi lherbert!
There is no documentation yet but you can duplicate an element from the config-templatebuilder > avia-shortcodes folder. Example, duplicate the button.php file. Name it boxes.php as if we’re trying to create a boxes shortcode. Edit the file, look for this code:
if ( !class_exists( 'avia_sc_button' ) ) { class avia_sc_button extends aviaShortcodeTemplate { /** * Create the config array for the shortcode button */ function shortcode_insert_button() { $this->config['name'] = __('Button', 'avia_framework' ); $this->config['tab'] = __('Content Elements', 'avia_framework' ); $this->config['icon'] = AviaBuilder::$path['imagesURL']."sc-button.png"; $this->config['order'] = 85; $this->config['target'] = 'avia-target-insert'; $this->config['shortcode'] = 'av_button'; $this->config['tooltip'] = __('Creates a colored button', 'avia_framework' ); $this->config['tinyMCE'] = array('tiny_always'=>true); }
Replace it with:
if ( !class_exists( 'avia_sc_boxes' ) ) { class avia_sc_boxes extends aviaShortcodeTemplate { /** * Create the config array for the shortcode button */ function shortcode_insert_button() { $this->config['name'] = __('Boxes', 'avia_framework' ); $this->config['tab'] = __('Content Elements', 'avia_framework' ); $this->config['icon'] = AviaBuilder::$path['imagesURL']."sc-button.png"; $this->config['order'] = 86; $this->config['target'] = 'avia-target-insert'; $this->config['shortcode'] = 'av_boxes'; $this->config['tooltip'] = __('Creates boxes', 'avia_framework' ); $this->config['tinyMCE'] = array('tiny_always'=>true); }
You’ll see the Boxes shortcode beside the button shortcode on the Advance Layout Builder.
Regards,
IsmaelDecember 24, 2013 at 3:09 am #203427Thanks Ismael! This should get me started.
-
AuthorPosts
- The topic ‘Customize Page Builder’ is closed to new replies.