0

I want to format a View to show content but without a teaser.

I can choose fields instead content but then I don't get all the CSS sytling I get with content.

I can hide the teaser in the View page with CSS as follows but I don't think that's good SEOwise.

.node--view-mode-teaser .node__content {
    display: none;
}

How to format a view to show content but without a teaser?

Update after Patrick's comment

enter image description here

4
  • Is your question: How do I show the full text of the node body instead of the summary? Nov 2, 2023 at 0:37
  • @PatrickKenny no, I don't want to show the full text. I do wish to show the "content" yes, but just without the teaser or summary.
    – viewer
    Nov 2, 2023 at 7:41
  • I'm not sure what you mean by "content". If you are using Fields, you should be able to delete the body field and then no teaser or summary will be displayed. Nov 2, 2023 at 10:08
  • @PatrickKenny I believe that the screenshot I've attached would clarify my intent.
    – viewer
    Nov 2, 2023 at 10:39

1 Answer 1

3

I advise you to use content rather than fields.

In view content, you can choose a view mode. Choose the view mode that suits you (full, teaser) or you can create one for your needs. In this example, the view mode is called "accroche" :

enter image description here

Go to to your content type / manage display. In this view mode you put the fields that you want to display in your view :

enter image description here

This way, you keep your css and it’s easier to manage if you modify your templates.

Your Answer

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

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