I've added a custom CHOOSE control for a sidebar on the page settings panel, I'd love to know if I can reloadPreview() on change just like the Templates Select you have added. Any suggestions?
https://cl.ly/002O3T2Q393y
Basically when I select your template select list, the preview reloads to show the new template, I would like to fire the same event when I choose different sidebar options.
Here is my code:
add_action( 'elementor/element/page-settings/section_page_settings/before_section_end', function( $element, $args ) {
$element->add_control(
'th_page_layout',
[
'label' => __( 'Sidebar', 'your-plugin' ),
'type' => \Elementor\Controls_Manager::CHOOSE,
'default' => 'full',
'options' => [
'left' => [
'title' => __( 'Left', 'your-plugin' ),
'icon' => 'fa fa-long-arrow-left',
],
'full' => [
'title' => __( 'No Sidebar', 'your-plugin' ),
'icon' => 'fa fa-times',
],
'right' => [
'title' => __( 'Right', 'your-plugin' ),
'icon' => 'fa fa-long-arrow-right',
],
],
'return_value' => 'yes',
]
);
}, 10, 2 );
Thank you so much of your help. We are big fans of this builder and we hope to release a new theme that will help promote it.
I've added a custom CHOOSE control for a sidebar on the page settings panel, I'd love to know if I can reloadPreview() on change just like the Templates Select you have added. Any suggestions?
https://cl.ly/002O3T2Q393y
Basically when I select your template select list, the preview reloads to show the new template, I would like to fire the same event when I choose different sidebar options.
Here is my code:
Thank you so much of your help. We are big fans of this builder and we hope to release a new theme that will help promote it.