Render link question

Hi @jmooring. I am testing your render link and I want to pass two attributes to this section {{- $attrs = merge $attrs (dict "rel" "external") }}. Something like this.

{{- $newWindow := i18n "newWindow" -}}
{{ $text := .Text | safeHTML }}
{{- $attrs = merge $attrs (dict 
     "rel" "nofollow noopener noreferrer"
     "aria-label" ($text $newWindow )
     ) }}

The aria-label parts throws an error can’t give argument to non-function $text for using two values together. But I would like them to be together to render something like Lorem Ipsum (opens in a new window). How can this be achieved?

Combine the two values with add, print, or printf.

I forgot about this! Works now.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.