Finexes Well-known member Dec 26, 2021 #1 Hey guys, I know that I can set e.g. a class for an overlay via data-overlay-config="{{ {'className':'customClass'}|json }}". Is it also possible to pass custom content to an overlay?
Hey guys, I know that I can set e.g. a class for an overlay via data-overlay-config="{{ {'className':'customClass'}|json }}". Is it also possible to pass custom content to an overlay?
Finexes Well-known member Dec 26, 2021 #2 Alright, I found a solution: Basically you can wrap your desired content in a div, for example: HTML: <div class="selector"> <div class="overlay-title"> Title </div> <div class="overlay-content"> Overlay content </div> </div> Then you can pass this content to your overlay via data-xf-click="overlay" data-target=".selector". Don't forget to add display: none; to .selector. This is something I can live with, but I'd appreciate it, if there's someone with a more elegant solution
Alright, I found a solution: Basically you can wrap your desired content in a div, for example: HTML: <div class="selector"> <div class="overlay-title"> Title </div> <div class="overlay-content"> Overlay content </div> </div> Then you can pass this content to your overlay via data-xf-click="overlay" data-target=".selector". Don't forget to add display: none; to .selector. This is something I can live with, but I'd appreciate it, if there's someone with a more elegant solution