如何在两个不同的地方用不同的url显示内容类型的节点,并在drupal中的一个地方隐藏一些字段?

I have a content type named Ailment, which displays all the ailments of the particular user, when u click the ailment, it goes to a particular node, displaying details and graphs of that ailment which is added by the user, this is fine.

Now in another page I wan to search ailment of the whole site and display the ailments, and when they click the ailment it should show the graphs and should hide some fields which shows only for the particular user..

For ex: user A is having a page where ailments wil be listed, when he clicks the ailment, for example cancer, then it goes to myailment/cancer, where some fields and graphs wil be displaying.. this is fine

Now I am having a another page /topailment, where I have a search box, any user can come and search any ailment, it should display the ailment for example cancer, then it should go to the page, topailment/cancer, where it should display only graphs and hide fields..

Hope I am clear..

I am trying to find a solution but going no where...

Please help

Thank you.

this is possible with Page Manager. It will take some learning, but the best place to start is here:

http://nodeone.se/en/learn-page-manager-part-1-overview

Essentially, you want a node to have two different page displays. There are several ways to do this, but page manager is the most direct for me.

Good luck!

Mike

As is always the case in Drupal, there are many ways you could do this. Two options come to mind immediately:

  1. Use views and create a view with multiple displays to renders your Ailment nodes in different ways.
  2. Create custom display modes using the Display Suite module.

You could even go for a blend of both options by creating additional display modes with Display Suite and rendering those display modes with views.

To do it purely with Display Suite: once display modes are configured, you can enable the 'View mode per node' option made available by Display Suite Extras (bundled with the core module) and pass the view mode as a URL parameter to the node. This way you would link to your node as normal from most pages and from the user page you would link to (for example) node/123?v=personalized to use the personalized display mode.

Which of these approaches you go for probably depends on your familiarity with these modules and what you're already using.

There is a module for that :) . It solves this specific problem and plays very nicely with display suite for hiding modules. You have to create a new view mode, assign it to your content type, select which fields you want to hide for each view mode and then you create a URL in your manage fields section for that particular view mode. https://www.drupal.org/project/view_mode_page