3

I want to create a views for overriding the node page for specific content. For example, when I click the link of a node in a list page, by default , it will go to the node page (e.g node/1), but I want to display a views page, so I can customize the views by views rather than customize the display in content type.

How can I do that?

1

1 Answer 1

0

Create a views of content, set path of it to something like mynode/%(or what you want(yourpath/%)), add contextual filter Nid, set default value Get Content ID from Url,and then customize views fields with what you want.
This link can help you about how to pass Nid to views

2
  • does it force redirect /node/1 to /mynode/1 ?
    – hkguile
    Commented Sep 25, 2015 at 4:47
  • you can when you data render link every node to 'mynode/nid` or you can redirect /node/nid to /mynode/nid(with rules or in hook_init)
    – Yuseferi
    Commented Sep 25, 2015 at 4:49

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.