I have a table with 2 columns containing "company" and "url", where company is a company name and url is the url to the company's website. I've created a url link by concatenating "url,'||',company" using this code:
IF (wp_wpdatatable_5.url like 'http%' , concat(wp_wpdatatable_5.url,'||',wp_wpdatatable_5.linkname) , wp_wpdatatable_5.linkname) AS RESOURCE
This works fine, and outputs a link or just the company name if a url is missing.. All rows with "company" are populated, but some rows do not have a corresponding url.
The problem is that the rows with just company names have no link, but rendering this column as a url link column shows them as links, but they are not and I want to show them just as company. How can I output the column where some of the cells are not links and others are?
You don't understand. My sql statement creates a link ( URL || COMPANY) if the url exists, but puts just the company name into the column if the url doesn't exists, so my sql is fine. The resulting column contains url links for some rows, but only company names for other rows. The table is fine in terms of the output.
The problem is that when that when I change that column from string to url link, the company names become clickable ! They become dead links. So, how can I prevent these rows from turning into links?
We are located in Serbia and our working time is from 10:00 to 17:00 CET. business days.
Sorry for misunderstanding, but that is not possible. When you change column type form string to URL all cells will become links, and cells which don't have url just string, that string will be insert in link like href.
No worries! I figured it out - instead using a url link column using the "||" feature , I concatenated the "a href=" link structure with the table output and put the code into a string field.
I have a table with 2 columns containing "company" and "url", where company is a company name and url is the url to the company's website. I've created a url link by concatenating "url,'||',company" using this code:
IF (wp_wpdatatable_5.url like 'http%' , concat(wp_wpdatatable_5.url,'||',wp_wpdatatable_5.linkname) , wp_wpdatatable_5.linkname) AS RESOURCE
This works fine, and outputs a link or just the company name if a url is missing.. All rows with "company" are populated, but some rows do not have a corresponding url.
The problem is that the rows with just company names have no link, but rendering this column as a url link column shows them as links, but they are not and I want to show them just as company. How can I output the column where some of the cells are not links and others are?
Thanks,
Marv.
Really like this plugin, guys.
Hi Marv,
Thank you for your purchase.
You can add one more If statement to ask is url column is empty to show just a link name, and if is not to do concat function that you provide.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Milan,
You don't understand. My sql statement creates a link ( URL || COMPANY) if the url exists, but puts just the company name into the column if the url doesn't exists, so my sql is fine. The resulting column contains url links for some rows, but only company names for other rows. The table is fine in terms of the output.
The problem is that when that when I change that column from string to url link, the company names become clickable ! They become dead links. So, how can I prevent these rows from turning into links?
Hi Marv,
Sorry for late response.
We are located in Serbia and our working time is from 10:00 to 17:00 CET. business days.
Sorry for misunderstanding, but that is not possible. When you change column type form string to URL all cells will become links, and cells which don't have url just string, that string will be insert in link like href.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
HI Milan,
No worries! I figured it out - instead using a url link column using the "||" feature , I concatenated the "a href=" link structure with the table output and put the code into a string field.
Marv
Hi Marv,
I am glad that you found a solution.
Best regards
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables