00000000
Table of Contents
Video tutorial
URL link columns in wpDataTables
“URL link” columns are used to render hyperlinks that can be clicked to open pages within your website, or in external websites.
- 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
- Sorting rules: alphabetical.
- Applicable filter types: text.
- Editor input type: One-line edit, Attachment
- Issues to note: sometimes issues may appear when you’re sorting on URL columns that feature a complicated HTML structure.
Additional settings for URL link columns are available:
- You can configure how the link should be opened, in the new tab or the same tab.
- Set NO-FOLLOW link or not
- Set NOREFERRER link or not
- Set SPONSORED link or not
- This option allows you to display the link as a button.
- You can set the button display text.
- You can set the button CSS class.
Attachment columns in wpDataTables
Rendering Rules
When creating an Attachment column, it is treated as a URL column where each URL points to the file attachment. The content in the cell should be a valid URL that directs to the file you want to link. For example:
https://wpdatatables.com/wp-content/uploads/2015/06/new_dummy_table.xls||Download Document
will be rendered as:
Download Document
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/wp-content/uploads/2015/06/new_dummy_table.xls
will be rendered as:
https://wpdatatables.com/wp-content/uploads/2015/06/new_dummy_table.xls
Additional settings for Attachment columns include:
- Target Configuration: Set whether the link should open in a new tab or the same tab.
- NO-FOLLOW Link: Option to set the link as NO-FOLLOW.
- NOREFERRER Link: Option to set the link as NOREFERRER.
- SPONSORED Link: Option to set the link as SPONSORED.
- Button Display: Display the link as a button.
- Button Display Text: Set the text displayed on the button.
- Button CSS Class: Customize the button appearance using CSS classes.
Example of a table with an attachment column
In the table below, you can see an example with several different column types, with the last column “CV ” representing an attachment. This is a list of potential candidates who have submitted their resumes. By clicking on each link, you can download the resume of the candidate you are interested in.
By following these guidelines, you can effectively use the Attachment column type to manage file links within your wpDataTables.
Profile Picture | wdt_ID | wdt_created_by | wdt_created_at | wdt_last_edited_by | wdt_last_edited_at | Name | Age | GPA | CV | |
---|---|---|---|---|---|---|---|---|---|---|
1 | Sara | 06/08/2024 11:11 AM | Sara | 06/08/2024 11:29 AM | Jane Doe | 29 | 3.75 | [email protected] | ||
2 | Sara | 06/08/2024 11:11 AM | Sara | 06/08/2024 11:30 AM | Michael Smith | 35 | 3.60 | [email protected] | ||
3 | Sara | 06/08/2024 11:11 AM | Sara | 06/08/2024 11:35 AM | Emily Johnson | 42 | 3.85 | [email protected] | ||
Profile Picture | Name | Age | GPA | CV |
Read more
- Creating editable tables and filling the table data manually
- Creating non-editable tables from Excel files
- Creating non-editable tables from Google Spreadsheets
- String columns
- Integer columns
- Float columns
- Date columns
- DateTime columns
- Time columns
- Image columns
- E-mail link columns
- Currency/price columns, and other columns with labels
- Formula (calculated) columns
- Coloring and styling columns
- Hiding columns