Closed wolf-em closed 1 year ago
I must be missing something, because I don't see any issue on my end with this?
{% for node in entry.vizyLink.all() %}
{% if node.type == 'vizyBlock' %}
{{ node.linkField.getLink() }}
{% endif %}
{% endfor %}
Results in:
<a href="http://vizy.test/blog/test" target="_blank">Custom link text</a>
When the template uses the renderHtml() method to render the Vizy field containing a link block, the href attribute is empty. Only happens on multisite with entries added to at least two sites.
<div>
{{ entry.pageContent.renderHtml() }}
</div>
<a href="{{ button }}" aria-label="{{ button.ariaLabel }}" target="{{ button.target }}">{{ button.customText }}</a>
Hmm, I still can't replicate that. I don't suppose button.url
makes a difference (it shouldn't)? Are the link field or Vizy field translatable? Is the entry you're linking to a different site to the one you're on? Is the entry with the Vizy field on the non-primary site?
What does a {{ dump(button) }}
produce?
Clsoing due to age
Description
When using the sebastianlenz/linkfield plugin to render a link within the context of a Vizy field, selecting a related entry returns a null href attribute for the rendered link. This only seems to occur on multisite installations.
Steps to reproduce
Additional info
Additional context