Forum


Replies: 4   Views: 2498
Template - replacetablevariable() with html link
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by mcgarryit  · 11-10-2017 - 17:29

Hi

I have several tables in my template.

The replaceTableVariable() function works fine, replacing the repeating rows of data in each table.

However, one of the table cell values is meant to be a proper HTML link. At the moment, I am just inserting the text of the URL. I would like to be able to add a proper functioning link. (I also produce a PDF format of the document, and would like the link to function properly in the PDF.)

I see the addLink() and replaceVariablebyHTML() methods, but cannot see how to apply these in the context of a table row being replaced using replaceTableVariable().

Is there any simple way for me to format the value for the link variable, in my assoc array, before I pass it to the method replaceTableVariable()...?

Thanks

Paul