Okay
  Public Ticket #1811181
Link Attributes
Closed

Comments

  • Michael Rinker started the conversation

    Using wpDataTables lite for the first time this week. I choose upDataTables because the data can be sorted by columns. Great feature! We are an affiliate and will be selling music on our site https://eventbutterfly.com/christmas_music/  .  Using Google Sheets, I created a spreadsheet, and uploaded it to our site. Now I need a way to add two things: 1 is link attributes, such as adding the target="_blank" attribute, so that the link opens up another tab. The issue is it does not appear as if Google Sheets allows link attributes? Instead the link closes our site, and takes you to the link's site. 2 is how to add images to a table / spreadsheet cell. Perhaps a perma link?

  •  471
    Isidora replied

    Hi Michael,
    Thank you for your interest in wpdatatables.

    • First option:

    When you are using data source like Excel or CSV and you need to make links in wpdatatables Lite or premium version you have to insert valid URL links in the cells. Then means that you need to insert for example:

    http://www.google.com or https://www.google.com 

    Rendering rules: If the content of the cells contains a combination of “two sticks” – || – everything to the left of this combination is used as an URL address for the link, and everything to the right as displayed text. For example:

    https://wpdatatables.com||Check out wpDataTables
    will be rendered as:
    Check out wpDataTables
    If the “||” combination is not found in the content, the entire content will be used both for the link and as the display value. For example:
    https://wpdatatables.com
    will be rendered as:
    https://wpdatatables.com

    When you insert like this and when you make a table you need to go in column settings of this column and change column type on DATA tab in column settings on URL link. Here you have options 

    URL target attribute - where you can set to open link in new or same window

    Show link as a button - where you can set to link be shown like a button.

    • Second option how you can insert links and also images from Excel or CSV files is whit HTML tags.

    SO you can insert HTML link tag in cell of the file like this:

    <a href="path_of_the_link">Your link name</a>

    and also images like this:

    <img src="path_to_the_image">

    When you insert like this in the file it will be shown like you need in wpdatatable. Please note that column type in wpdatatables have to be set to string so HTML tags can be rendered.

    Best regards.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

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

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables