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

OverlayTrigger to different URLs?

Discussion in 'XenForo Development Discussions' started by Jaxel, Dec 29, 2014.

  1. Jaxel

    Jaxel Well-Known Member

    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?
     
  2. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    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.
     
  3. Mike Creuzer

    Mike Creuzer Well-Known Member

    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.
     
  4. Daniel Hood

    Daniel Hood Well-Known Member

    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.
     

Share This Page