This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

dzg
dzg

I need to display a component partial in a modal window. I am able to show a partial from my /themes folder in the popup, but not a partial from my component. This is the code I've tried:

<div id="myModal" class="modal fade">
    <div id="modalContent"></div>
</div>

<button type="button" data-toggle="modal" data-target="#myModal"
    data-request="onGetContent"
    data-request-update="delete: '#modalContent'">Launch modal</button>

But the "delete partial is not found". If I move the delete partial to /themes then it works.. Any ideas??

Last updated

jaslian.20228
jaslian.20228

you need to reference the component

use this format:

data-request-update="'{{ SELF }}::delete': '#modalContent'"

be careful with the wrapping of single quote and doubles quote

or you can change {{ SELF }} to your component name like your_component::your_partial

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.