XenForo How to load template in overlay

F

FoxSecrets

Guest
When I try to load a template in the overlay it doesn't work, but when I open the url directly it works.

How to correctly load a template in overlay? Can someone give me a light?

What I've done so far:

LINK:
Code:

<a href="admin.php?my-template" data-xf-click="overlay">See all items</a>

TEMPLATE:
Code:

Code:
<xf:title>My Title</xf:title>

<div class="my-div"></div>

<script type="text/javascript">
  function showItems() {
      // code
  }

  showItems()
</script>

Continue reading...