Has anyone done the following and if so how to do it?
I am overlaying the core accordion component. In 'items' tab, on the click of add , i want my desired child component to be dynamically added, i.e., i do not want to choose the child component from the dropdown but i want the slide to be added on click of add instead of going to dropdown to select the component.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @Zendark ,
You can try below-
$('.add-slide-btn').on('click', function() {
$.ajax({
url: '/bin/add-slide', // Custom Sling Servlet or endpoint
type: 'POST',
success: function() {
// Reload or dynamically update the Accordion
}
});
});
This solution allows for dynamic slide addition via a button, with the data being saved for persistence.
Thanks
Ritesh Mittal
Hi @Zendark
Its a multifield, so you can remove popup/selection logic and just add Title maybe.
And In your sling model read those number of items and , inject the Slider component in HTL.
Hi @Zendark ,
You can try below-
$('.add-slide-btn').on('click', function() {
$.ajax({
url: '/bin/add-slide', // Custom Sling Servlet or endpoint
type: 'POST',
success: function() {
// Reload or dynamically update the Accordion
}
});
});
This solution allows for dynamic slide addition via a button, with the data being saved for persistence.
Thanks
Ritesh Mittal
Views
Likes
Replies
Views
Likes
Replies