XF 2.1 display template in overlay when returning view?

CStrategies

Member
I have seen forum discussions about how to display a template as an overlay on clicking a link or using a form submit button with the OverlayTrigger class. However, what I want to do is display a template as an overlay conditional on some code in the _save method within a service, and have the server-side php load the template as an overlay. Is this possible?
 
I figured this out. Simply wrap your template in a div with the class overlay.
To include an overlay title with a close button in the XF style, add:
Code:
<div class="overlay-title"><a class="overlay-titleCloser js-overlayClose" role="button" tabindex="0" aria-label="Close"></a>Your Title</div>

More helpful things like this can be found in the core.js.
 
Back
Top Bottom