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
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@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of richard reyes Sent: Wednesday, May 16, 2012 4:25 AM To: support@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
Hello All, Joel,
Thanks for the reply
On:
*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.*
When you say "node page" is this is the page that shows me the details of a specific content right ? The one that is built in with drupal.
I will try the panel approach, but if anybody else have inputs please let me know.
Regards,
Richard
Hi All,
Update, I was able to hide the client company section by going to structure
content types >> update my custom content >> manage display >> default
settings.
I drag the ref column to the hidden section.
Now off to creating the contextual filter on my list of client view.
Regards,
Richard
On Wed, May 16, 2012 at 11:31 PM, richard reyes rgreyes.1977@gmail.comwrote:
Hello All, Joel,
Thanks for the reply
On:
*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.*
When you say "node page" is this is the page that shows me the details of a specific content right ? The one that is built in with drupal.
I will try the panel approach, but if anybody else have inputs please let me know.
Regards,
Richard