0

I am probably doing this the wrong way, so please correct me if I am wrong!

I have created a new content type, called "Entities". My content type has many fields, and the default view when you visit "/node/123" is ugly, and doesn't permit much customization. So I created a new View with all my fields displayed exactly how I want, and set the path to be "entity/%", so when you visit "/entity/123" you get my new, prettier version.

However, the default view at "/node/123" still exists, and is the default display when you click on a link in the search results, or admin interface, etc.

How can I make it so "/entity/123" (my view) completely replaces "/node/123" (default view) everywhere? Eg. becomes the default view for the "entity" content type?

  • 3
    I wouldn't use views for something this at all. Better go to /admin/structure/types/manage/entity/display and adjust display settings for the default view there. You can hide some of them, and with Field Groups module (contrib) you can also rearrange them pretty easily – Hudri Sep 12 at 13:31
0

Your main concern is you don't want the /node/123 link to be available publicly or in search results? You could unpublish the node and then make a Boolean field in your content type and for your view choose to show the piece of content based on your new boolean field INSTEAD Of the stock published/unpublished checkbox. So your view by default will only show "published" content but you can change that so that it shows "live" content (new boolean field you created for that content type) or like that and ignores the published/unpublished field. So node/123 won't show up for anonymous users or in search results but will still be processed by your view. Assign the view to the path of your choice /contact-page or whatever and you're golden.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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