Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #444627

    hello,

    i read the article about adding new elements to the advanced layout builder:

    http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/

    so far so good, i managed to integrate a new sections-php. but like that the standart section element was overwritten. so i renamed the file to video-sections.php and began editing the file. my only purpose is to create an element that is able to display video backgrounds WITH sound. i easily achieved that by changing the mute value from true to false.

    however i have certain problems with the renaming. i had to rename certain values, so that the standart section element wouldn’t be overwritten. that worked, but i probably made some mistakes since the full width feature was broken after my editing and even the fooer lost its full width.

    so here is finally my question: what lines / names in the section-php do i have to change so that i really ADD a new elemnt instead of modifying an old one. would be great, if you could add some more instruction to the tutorial i posted above.

    however the feature to easily add elemnts to the layout builder is really awesome. thanks a lot for your help

    best regards
    philipp

    #445783

    Hey p_niedrich!

    All you would need to do is this, https://kriesi.at/support/topic/background-video-with-no-sound/#post-229951, if your wanting the background video to have sound.

    You could request this feature here, https://kriesi.at/support/enfold-feature-requests/, and if it gets enough interest then we may see something get added in a future update.

    Best regards,
    Elliott

    #494402

    hey elliot,

    unfortunately you didn’t refer to my question:
    “what lines / names in the section-php do i have to change so that i really ADD a new elemnt instead of modifying an old one. would be great, if you could add some more instruction to the tutorial i posted above.”

    best regards
    philipp

    #495299

    Hey!

    In your custom section source file (in your child theme) you need to rename the following:

    if ( !class_exists( 'avia_sc_section' ) ) // <-- THIS
    {
    	class avia_sc_section extends aviaShortcodeTemplate{
    
    			static $section_count = 0;
    			static $add_to_closing = "";
    			static $close_overlay = "";
    
    			/**
    			 * Create the config array for the shortcode button
    			 */
    			function shortcode_insert_button()
    			{
    				$this->config['name']		= __('Color Section', 'avia_framework' ); // <-- THIS
    				$this->config['icon']		= AviaBuilder::$path['imagesURL']."sc-section.png";
    				$this->config['tab']		= __('Layout Elements', 'avia_framework' );
    				$this->config['order']		= 20;
    				$this->config['shortcode'] 	= 'av_section'; // <-- THIS
    				$this->config['html_renderer'] 	= false;
    				$this->config['tinyMCE'] 	= array('disable' => "true");
    				$this->config['tooltip'] 	= __('Creates a section with unique background image and colors', 'avia_framework' );
    				$this->config['drag-level'] = 1;
    				$this->config['drop-level'] = 1;
    
    			}

    To something like custom_av_section, so the original section doesn’t get overwritten.

    Best regards,
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.