External link not exported to PDF

Hi,

When using the linkto tag to create a link, the link appears as it should within Silverfin, but on export
to PDF, it seems the link is converted into plain text.

I’m using the syntax suggested here:

With friendly regards,
Takis

Hi @Panagiotis_Issaris ,

So if I understand your question correctly, you would like the link to also be working in the PDF file? Indeed, that’s not supported right now.

I’ll forward your question to our core developers to check if they would consider implementing this feature, but definitely can’t make any promises in this respect.

Keep you posted!

Kind regards,
Robin

Hi Robin,

Yes, the link still working in the PDF was exactly what I would like to happen.

Because currently, a link such as click here would get converted to plain “click here”, on which one cannot click and moreover the URL is not visible in the PDF.

Thank you for your quick reply!

With friendly regards,
Takis

Bumping this ancient thread, is there any other way to get working links in a PDF? At the moment we’re just straight-up copy-pasting the https address, functional but not that pretty

Hi @Wsteppe ,

Thank you for digging up this one :sweat_smile:. I remember flagging this back in the day but honestly forgot what the current status is.

I’ll check with our backend engineers and provide you an update asap.

Kind regards,
Robin

Hello again @Wsteppe ,

Just wanted to inform you that we have added some more weight to this request on our backlog. Still hard to say when or whether we will come up with a fix for this, but at least it’s again subject to discussion somewhere the upcoming weeks.

Of course, workarounds involving the smart use of ic and nic tags could offer a solution here.

If anything changes I’ll provide you with an update.

Kind regards,
Robin

1 Like

Hi,

Is this request/fix already implemented? Would be useful for us as well.

Thank you in advance.

Kind regards,
Jonathan

Hi @JDB ,

Seems like this one is still pending in our backlog. Apparently other things always proved to be a bit more important :sweat_smile: .

Nevertheless, I’ll do my best to again increase priority.

Keep you posted!

Kind regards,
Robin

Hi,

It seems this is already working, isn’t it? Doing the following, will create a link in the PDF-file:

{% linkto "www.finify.be" %}www.finify.be{% endlinkto %}

However, if such link is needed as part of a translation tag, it won’t work:

{% comment %}translation{% endcomment %}
{% t= "t_finify_be" default:"Click {{ l_finify }} to go to the site of FINIFY" %}
{% t= "t_here" default:"here" %}

{% comment %}create link to site{% endcomment %}
{% capture l_finify %}{% linkto "www.finify.be" %}{% t "t_here" %}{% endlinkto %}{% endcapture %}

{% comment %}Print sentence{% endcomment %}
{% t "t_finify_be" l_finify:l_finify %} 

Can this also be modified?

Hi @FINIFY

You can link to external websites, also in translations, if you use http or https.
It’s also mentioned on our documentation: Linkto

Let me know if that didn’t sort out your issue

KR
Romy

No, that still doesn’t work.

To be clear: I did add the http but still not working, and I thought it was related to the fact it’s being captured and used as a variable in a translation tag

It works fine in input-mode, but not working on a exported PDF

Hi @FINIFY

Sorry indeed it does not work in PDF.
What does work in PDF is using the following:

{% comment %}translation{% endcomment %}
{% t= "t_finify_be" default:"Click {{ l_finify }} to go to the site of FINIFY" %}
{% t= "t_here" default:"here" %}

{% comment %}create link to site{% endcomment %}
{% capture l_finify %}<a href="https://www.finify.be">{% t "t_here" %}</a>{% endcapture %}

{% comment %}Print sentence{% endcomment %}
{% t "t_finify_be" l_finify:l_finify %}

KR
Romy

1 Like

Nice, thanks :handshake:

Actually, in my case, it isn’t working, due to the fact the translations are used inside a HTML-table, I think :grimacing: (and I think HTML table refuses those href-tags somehow?)

Tried some workarounds, but doesn’t work (and I cannot put the translations outside of the HTML table due to the need of text & white space alignment :smiling_face: ) :

{% comment %}translation{% endcomment %}
{% t= "t_finify_be" default:"Click {{ l_finify }} to go to the site of FINIFY" %}
{% t= "t_here" default:"here" %}

{% comment %}create link to site{% endcomment %}
{% capture l_finify %}<a href="https://www.finify.be">{% t "t_here" %}</a>{% endcapture %}

{% comment %}Print sentence{% endcomment %}
<table class="usr-width-100">
  <tbody>
    <tr>
      <td class="">{% t "t_finify_be" l_finify:l_finify %}</td>
    </tr>
    <tr>
      <td><a href="https://www.finify.be">Test that does not work</a></td>
    </tr>
  </tbody>
</table>

Can these be allowed inside HTML-tables? Or perhaps, instead of the workaround with href, make the first use-case (use a capture as a variable in a translation-tag) possible?

@FINIFY
Looks like for now your only solution is to close the HTML table, use the link, then start a new table.
In the mean time, I have logged this as an internal feature request and requested if linkto can be adjusted so it works in PDF exports too.

KR
Romy

Hi @Panagiotis_Issaris , @Wsteppe , @JDB and @FINIFY ,

We have some great news!

Our engineers have enabled links in PDF exports!
Unfortunately we could not make it work with the Liquid linkto tag for code design purposes, but when you use the HTML tag <a> and attribute hrefit works like a charm :mage:.

For example, the piece of code that is shared by @FINIFY above now works and creates a clickable link in PDF export

{% comment %}translation{% endcomment %}
{% t= "t_finify_be" default:"Click {{ l_finify }} to go to the site of FINIFY" %}
{% t= "t_here" default:"here" %}

{% comment %}create link to site{% endcomment %}
{% capture l_finify %}<a href="https://www.finify.be">{% t "t_here" %}</a>{% endcapture %}

{% comment %}Print sentence{% endcomment %}
<table class="usr-width-100">
  <tbody>
    <tr>
      <td class="">{% t "t_finify_be" l_finify:l_finify %}</td>
    </tr>
    <tr>
      <td><a href="https://www.finify.be">Test that does not work</a></td>
    </tr>
  </tbody>
</table>

Let me know if you have any questions!

Kind regards,
Robin

That’s already a start, thanks for that! :ok_hand:

However :grimacing: most of the translations that have links in them, were converted from a working document (simple PDF) that has the links marked in a special way (in blue and underlined), which is what most readers know already.

Is this possible to add by default? If this wouldn’t be possible, it would mean we would need to change the context of text.

For example, a sentence with a link like “a detailed look at the calculation of expenses” is just hard for the user to know where to click (it isn’t even clear there is a link from the sentence)

So, above sentence would even need to be changed into something like “click here for a detailed look at the calculation of expenses”, which is not what we want to do (adding action context in our text).

Sure you’ll understand :smiling_face: