2

In Drupal 8, I created template for solr search view views-view-unformatted--solr_search_content--block.html.twig

I am trying to print the content link by {{ row.content['#view'].style_plugin.render_tokens[ loop.index0 ]['{{ title }}'] }}

But displayed title with link. I need link only, Any Idea!

{% for row in rows %}
<div class="row block p-5">      
    <div class="views-row">
      {{- row.content -}}
    </div>      
    <div class="col-2 text-center chevron-right my-auto">
      <a href="{{ row.content['#view'].style_plugin.render_tokens[ loop.index0 ]['{{ title }}'] }}">
      <i class="fal fa-chevron-right"></i></a>
    </div>
</div>
{% endfor %}
1
  • Can you add a content url field to your view's fields in the UI and then render that?
    – sonfd
    Commented Aug 5, 2021 at 16:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.