How can I use Modal in Metronic Theme
I added assets files to my mvc project. I can't create a modal. What codes and files do I need to add to my project to open a modal when a link is clicked as soon as possible?
I've been dealing with this job for hours and I'm starting to think that I don't deserve my salary. I would be very happy if you can help :D
Replies (3)
Hi Tarik,
Thank you for reaching out to us.
To use our theme you need to load two main js and css files.
CSS:
"plugins/global/plugins.bundle.css",
"css/style.bundle.css" JS:
"plugins/global/plugins.bundle.js",
"js/scripts.bundle.js" Please note that these two files are mandatory for theme to be working fine. The bootstrap dependency is included into plugins/global/plugins.bundle.js.
For modal usage examples, you can refer to our documentation.
https://preview.keenthemes.com/html/metronic/docs/base/modal
Let me know if you will need any further help on this.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Thanks for your help it worked.
I put the files you said in _layout.cstml and run it on my modal page. But what I want to do is to display a view in a modal.
For example, something like this;
<a data-bs-toggle="modal" data-bs-target="#kt_modal_1" href="/Home/Index/@item.ID"></a>
<div class="modal fade" tabindex="-1" >
</div> It will display a view in a modal using dynamic ids.
Since the IDs are dynamic, the content must be reset every time the modal is closed. Because when the next ID is clicked, a special view will be shown to it.
I started researching
. Any help would be appreciated. Big step for me, small step for you 
Hi Tarik,
Could you please provide us with more info on what you are trying to achieve?
It sounds like something not standard use case for modal, you can consider handling this on a separate view.
Regards,
Lauris Stepanovs,
Keenthemes Support Team