[support] Noob Question on Views or D7

Joel Willers joel.willers at sigler.com
Wed May 16 13:04:58 UTC 2012


You have a couple choices from my experience. You can add a block View. The problem with this, you'll need arguments, which don't pass to blocks. So you'll have to go into the argument, add a default argument, make it PHP and add the following code to it:

$path = drupal_get_path_alias($_GET['q']);
$path = explode('/', $path);
echo "<!-- path = $path -->"; //For error testing if (($path[0] == 'path1' || $path[0] == 'altpath1') && $path[1] != '') {
  return $path[0];
}

$path[0] is first argument, $path[1] is second, etc.

The second (and, in my opinion, preferable) option is using Panels. Panels allows you to just add Views to the node page. You can remove pieces, you can move stuff around. It's very powerful, but has a bit of a learning curve.

Good luck!


Joel 

From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On Behalf Of richard reyes
Sent: Wednesday, May 16, 2012 4:25 AM
To: support at drupal.org
Subject: [support] Noob Question on Views or D7


Hi All,

Good day to all.

Drupal noob here trying to learn and implement something on views.

Some background: I have a couple of custom content types, Reseller Company and Client Company. The idea is a reseller can have multiple client companies. Inside reseller I have created a node reference field to client companies. So I have created a couple of views displaying resellers and client companies independently. 

My goal is that when I clicked on the details of a reseller company I can modify the default view and maybe add a tab that will display the client companies of the selected reseller company.

I also have devel, views and reference module installed.

Right now, my specific question would be where can I modify the default view for editing a particular node?

I have attached screenshots, a list of resellers and the edit view of the reseller node. Let me clarify my goal, I would like to edit the page displayed in [edit view of reseller.png] remove the client companies section and put it in a tab.

Best regards,

Richard


More information about the support mailing list