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>
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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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