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
    Aug 5, 2021 at 16:54

0

Your Answer

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

Browse other questions tagged or ask your own question.