Run a fancyBox trick on landing block

Discussion in 'Subrion CMS Plugins Discussion' started by alexmtz.g, Apr 11, 2017.

  1. alexmtz.g

    alexmtz.g New Member

    Hello to everybody,

    First of all, I want to thankful the people who help on this forum.

    I have a request hard for me but may be easy for many people:
    I want to add a fancyBox trick on a landing block in order to see text over the same page. I want the user to click a button and give a popup box of fancyBox with html text or pictures.
    I have a code copied from the samples provided from oficial fancyBox docs, but it does not work.

    I copy from here this code:

    <h2>Reportes bonitos</h2>

    <a data-fancybox data-type="ajax" data-src="" href="javascript:;" class="btn">Más info</a>​

    [I just modify minimum things, as you may can see.]

    I put that code on landing1 code of BusinessCard Template of Subrion, but it does not work as I expected. It shows the text but if I click the button it does not work, it does nothing.

    I also tried with this code: but it neither does not work.

    Can somebody help me? Thank you.

    Attached Files:

  2. Gleb_S.

    Gleb_S. Subrion Designer Staff Member

    Hi @alexmtz.g !

    Subrion has a built in fancyBox plugin version 2.1.5. Therefor the code should look like this:
    <p><a class="fancybox.ajax" href="http://URL_TO_CONTENT" rel="ia_lightbox">More</a></p>
    Main part here is rel="ia_lightbox" - this attribute activates fancyBox in Subrion. Also, fancybox.ajax class tells fancybox to load content into popup.
    Please be advised that your URL to content should be on the same domain (cross domain requests are not allowed) or you can set Access-Control-Allow-Origin to accept all requests from untrusted sources if you are using external link.

    Please ask in case you have more questions.

    Vasily_B. likes this.

Share This Page