Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #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.

    #203225

    Hi 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,
    Ismael

    #203427

    Thanks Ismael! This should get me started.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Customize Page Builder’ is closed to new replies.