0

This could be a noob question but i am really not able to understand how to achieve this. I have several content types and custom detail page i.e view page for each content type. So each time i add/edit/update/search a content type say news or something, it redirects me to default node page but i don't want that. I want it to redirect to the view page i have created.

There is a module called Rules, which helped me to redirect to that page after adding/updating content, but it has some redirection errors which results in server ended unexpectedly error. Also in search the default page shows up as node page not my custom view page.

How do i do this, so that my custom view page becomes the default page for my content type. Please help..?

1

There are a couple of ways to do this.

One is to edit your node template file and field order so that the default node view is how you want it to look.

Another, if you prefer to create a view, is to do so and use a module like Internal Nodes or Page Manager (part of ctools) to redirect to the view.

  • But what if i need custom url's for a node of one of my content type?? Also editing the content redirects you to system generated node page, in search too, how will that be controlled? – Coder anonymous Nov 29 '14 at 6:50
1

If you don't want the node information to ever be visible to the user, I would suggest something like this:

  • create the content type as normal, under manage display set the label and field to hidden. This will ensure that the content itself does not show. This will essentially create an empty page

  • build a content view, as a block using the content type for reference.

  • using a contextual filter to retrieve the node information, you can build the view to show the information in the format you want.

  • under structure-blocks, set that view to only display in the main content area of that specific content type

This will allow the view to show while hiding the original content, without the need for redirects - a little more SEO friendly, and faster to render.

  • This is a way for sure, but not the way i want to achieve..look i want only one view which will be common to that content type to display the content. In your answer i have to insert that particular view in all the nodes creating, and also i have multiple content types and different layout to view the details for those. – Coder anonymous Nov 25 '14 at 9:38
  • Problem is multiple layouts, multiple content types..How to handle this..though your answer takes care of seo friendly users which is one of my requirement.. – Coder anonymous Nov 25 '14 at 9:42
  • you don't need to 'insert' anything in anything - you set up the view, set up the block and forget it. The view does the rest, regardless of the content of the node - you don't need to manually add it to each node - you assign it to the content type, not each individual node. Regardless of how you do it, if you have multiple layout and multiple content type requirements, you need to create multiple views either way – Geoff Nov 25 '14 at 12:40
  • May be i am not able to make myself clear, i have blocks that are independent of content type, but still i have to show them based on content type, also appearance, placing, position of blocks is different in each content type page. How will i achieve that based on your solution? – Coder anonymous Nov 29 '14 at 6:48
0

You can use eva field module, what is does is, it makes "the output of a View to be attached to the content of any Drupal entity".

So you can show a view in manage field options in the content type. Also you might want to use contexual filter for getting nid's which would make view more dynamic, as said by @Geoff.

0

This sounds like a job for Page Manager (part of CTools), and specifically it's HTTP redirect variant.

Look at Johan Falk's series on Page manager, specifically this one: Learn Page manager! Part 2: Introduction and more

And if you do decide on Page Manager, then please give @Darvanen the credit as I only now saw that he also mentions it.

  • But what if i need custom url's for a node of one of my content type?? Also editing the content redirects you to system generated node page, in search too, how will that be controlled? – Coder anonymous Nov 29 '14 at 6:51
  • Custom url for node : override node/% page, and add access condition on node's nid or type. For node edit override page for node/%/edit, and place the variant at the top. First variant that matches is used. Watch the video series and it will all become apparent. – J. Reynolds Nov 29 '14 at 11:48

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.