2

I've created a block display view to list recent posts on a page. Which variable can I use inside the views-view-fields.html.twig template file in order to retrieve the link to the post?

<div class="thumbnails thumbnail-style thumbnail-kenburn">
  <div class="thumbnail-img">
    <div class="overflow-hidden">
        {{ fields.field_image.content }}
    </div>
    <a class="btn-more hover-effect" href="{{ ??? }}">read more +</a>
  </div>
  <div class="caption">
    <h3>{{ fields.title.content }}</h3>
    {{ fields.body.content }}
  </div>
</div>

1 Answer 1

2

Add a "Path" field and include it in the view. It should be something like: {field.path.content} You can always format it :D

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.