Widget_Tabs::_content_template()
Render tabs widget output in the editor.
Description
Written as a Backbone JavaScript template and used to generate the live preview.
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |
Source
includes/widgets/tabs.php
<# _.each( settings.tabs, function( item, index ) { var tabCount = index + 1, tabContentKey = view.getRepeaterSettingKey( 'tab_content', 'tabs',index ); view.addRenderAttribute( tabContentKey, { 'id': 'elementor-tab-content-' + tabindex + tabCount, 'class': [ 'elementor-tab-content', 'elementor-clearfix', 'elementor-repeater-item-' + item._id ], 'data-tab': tabCount, 'role' : 'tabpanel', 'aria-labelledby' : 'elementor-tab-title-' + tabindex + tabCount } ); view.addInlineEditingAttributes( tabContentKey, 'advanced' ); #> <div class="elementor-tab-title elementor-tab-mobile-title" data-tab="{{ tabCount }}" role="tab">{{{ item.tab_title }}}</div> <div {{{ view.getRenderAttributeString( tabContentKey ) }}}>{{{ item.tab_content }}}</div> <# } ); #> </div> <# } #> </div> <?php } }