Okay
  Public Ticket #3816869
I need my image link to be an overlay, not open in a new window
Open

Comments

  •  1
    Chris Dyer started the conversation

    Hi… I have multiple tables set up with a column that (if populated) will read "pic". That column is formatted as a URL Link and when clicked it will open a new tab with a picture of the car (first car has a link to pic on this page):

    https://308gt4.com/1974-chassis/

    The ONLY option for the URL Target Attribute is to have it open in a new tab or not. There really should be two other options: open in a new window, and open as an overlay.

    I want these images to open as an overlay when my visitors click the "pic" link. As an example of the behavior I'm looking for, you can click on the attachment and see how it opens as an overlay here, or you can click on any photo on this page from my site:

    https://308gt4.com/casaferrari/

    Is there a way I can make my links open as an overlay instead of in a new tab?

    Attached files:  target.png

  •  1,877
    Miloš replied

    Hi Chris,

    Once again, our apologies for that extremely old ticket which our system flagged as 'replied' in error.
    We will do our best to switch to a better support platform as soon as possible - In the meantime, we will try to minimize any issues like that.

    You can also contact me on my work Email if any long delay happens for a reply for any of your tickets - it will be in my signature.

    Thanks again for your patience.


    - In regards to this scenario, good news, we already have a built-in possibility to load images from the tables in a 'LightBox' overlay, exactly as the example you have shared.


    There is just a limitation for this - The behaviour to load images can only be possible for an "Image" column type, so you can't use this on URL Link Columns.

    Our developers made a dedicated column type as "image" for this purpose.

    Please check the full details on this Documentation along with our example table with this LightBox effect.


    So it depends on how you formatted these values at the moment - you might need to 'change the approach' in the way how the actual cell value will be formatted, in order to get the image column to render for your desired result.



    2. And the second limitation, this can only work for 'non server side' tables.
    As mentioned on the Documentation :

    • If you would like to open full-size images in lightbox, you can use a plugin for that, e.g. WP Lightbox 2  (please note that this is available for tables that aren’t editable)


      Your table on that Page is a Manual type - This is a 'server-side processing'/editable table, so you can't use the LighBox solution on it directly, but there is a workaround.


      You could make a new SQL Query-based table which pulls the same data,

      and disable server-side processing in the Data Source settings of that table.

      For Manual Tables, you can check under Editing tab,  what is their "MySQL Table name".

      Then make a new SQL Table like this :  "SELECT * FROM Table_Name", 

      and disable server-side processing, this way you could make the LightBox work.

       

      If you need the main source data to be editable from our plugin,

      for example, a use-case could be to use the main Manual Table for Administrators to edit in the back-end;

      and for front-end to be able to open images in LightBox,  you could pull that data into the new SQL Table.


      Let me know if that makes sense, and if you have any questions.
      Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  1
    Chris Dyer replied

    Hi Miloš,

    The issue with using the built-in method is that I don’t want the image showing in the table. I want my users to click on a word like “pic” or “image” and then the image appears in the light box. There doesn’t appear to be a way to do that when the column is formatted as an image column type. The “image” column type is restricted to showing a tumbnail or the full image.

    So… I tried route two by creating an SQL Query-based table, downloaded WP Lightbox 2, and that did EXACTLY what I was looking for. Well, close enough that it works. I wish I could get a caption in the light box, but you have to use a title tag to get that to work (and I see no way to do that in wpDataTables):

    title="my caption"

    One thing that's started happening now that I'm using the SQL Query-based table is the column by which the table is sorted has a highlighted border around it. I don't want that, and it wasn't there before. I want no borders, how do I get rid of that (see screen shot link below)

    screen shot

    Alternatively, you can just visit any table on my site, here's a link:

    https://308gt4.com/1975-chassis/

    I want the table to default sort by the "Chassis" column. I just don't want the highlighted border visible when sorted by that or any other column. The arrow in the header is sufficient. 

    Thanks again, this is a good, workable solution.

    Chris