0

I would like to know what is the best way display a view instead of the content page. This is to have the versatility of views when showing fields instead of the traditional view mode. My current setup is:

  1. Use Panelizar to manage node display
  2. Create a view block with the node id as contextual filters
  3. Add this block to the panelized panel

My question is: is there a better way? Maybe one that does not require an external module?

Thanks

1 Answer 1

1

I think the Drupally way to replace node content with a views block would be to hide the fields via the Display Settings, add the fields to your views block, display the views block on the node.

If you cannot hide the fields on this content type, I would suggest creating a content type for this type of page and use case.

My personal vote, if you need truly "re-arrangeable" content, would be to start using Paragraphs.

https://www.drupal.org/project/paragraphs

I offer this as an answer because I feel that while things like 301 redirects, NID template overrides, or even hook alters might get the job done, they may be a little hacky for a content situation.

Paragraphs allow you to create re-useable pieces of content with as many or as little fields in each as you'd like. And by far Paragraphs has been the best content experience I've had in Drupal.

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