• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

OverlayTrigger to different URLs?

Jaxel

Well-known member
#1
So I have this code:
Code:
<a href="{xen:link 'media/media/popout', $media}" class="OverlayTrigger" data-cacheOverlay="false" data-overlayoptions="{&quot;fixed&quot;:false}">
This is great, as it loads an overlaytrigger. However, what about graceful degradation? If JS fails, I don't want the user to go to /media/popout, I want them to go to /media. Is there a way to set the overlay trigger to go to a specific URL, while the link goes somewhere else?
 

Mr. Goodie2Shoes

Well-known member
#2
Use
Code:
data-href="{xen:link 'media/media/popout', $media}"
and
Code:
href="{xen:link 'media/media', $media}"
as XenForo will look for data-href first for the overlay trigger URL.
 

Mike Creuzer

Well-known member
#3
What are the options available with OverlayTrigger? I want to pass a variable to the view's templates somehow, just trying to see if this is easily done.
 

Daniel Hood

Well-known member
#4
Looking through the javascript, it seems as if data-href is the only one.

There do appear to be some options but you can't pass them by manipulating the html. They're mostly used by like the lightbox javascript calling it.