Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

My project runs on Drupal 6, and I'm using Views.

I have a main menu with two submenus (menu -> sub1 -> sub2).

This image shows what it looks like on my "edit panel."

screenshot

The box with an orange border is the second submenu, and the one with a black border contains the item content assigned to this second submenu.

All the items from all submenus assigned to first submenu (main menu -> sub1 -> sub2.1, sub2.2, sub2.3 ...) are showing up already in the first submenu. (Th first submenu is a drop-down in the main menu; I don't want to have all submenus in the main menu, but just the first one.)

I want to hide them from there and display only the item that belongs to ie. sub2.1 or sub2.3. When I click sub1, I see all items from all sub2; when I click sub2.1, I see the correct items assigned to this submenu.

share|improve this question
    
It would be helpful to have some additional information. How is the list of menu items being generated in the main menu? Is the main menu one of the content items in the panel shown in your image? If you are using views in this example, please provide the filters and any contextual filters you have defined. Also, in the first sentence you indicate that sub2.1 is a child of Sub1, in the second you indicate it is a child of sub2 (is that a typo?). –  Ashlar Apr 4 '12 at 14:15
    
i try to say that sub1 has many sub2, not just one so i called them sub2.1, sub2.2 and so on... Main menu and submenus are generated from "taxonomy list". the orange box (sub2.1, sub2.2 ...) is Views with Arguments: "Taxonomy: Parent term" and Filters: "Taxonomy.Vocabulary = My Vocabulary". The black box with items is also Views but it load from "View pane" in "edit panel" (my image from main question). In views of black box (the items) i have only Filter: "Node.Type = my_type". –  Kamil Apr 4 '12 at 14:22
add comment

1 Answer 1

To understand what may be going wrong in your attempt it would help to clarify a few things about which modules do what.

  • Your menus are handled by either core menu or another of the menu modules that build upon it. They display links and and any selection reroutes the browser to a new URL.

  • Views is a User interface to query the database in which all of your content is held. If you select the settings tab in the main views page you can set the actual SQL query to be displayed in the preview area. This is helpful in understanding what is being searched for in your settings, although you will need some understanding of queries to make sense of it. A view is called either by using the defined path in the URL or by placing the view in a panel (Which you have done here).

  • Panels is primarily a module to handle the display of content. However, it works very closely with Page Manager module.

  • Page Manager intercepts URL requests and acts upon them in accordance with rules you establish for selection and contexts. Panels and Page Manager collaborate together and switch between themselves regardless of where you start in the UI.

When you select a menu item it is requesting that the browser go to a specified URL (menu). That URL request should be requesting the panel page (panels and page manager) which in turn is requesting the view that you have placed in it (Views). For your example, once the request is made menus, panels and page manager are done. Your real issue is with the views, so you must focus on the view module and your definition.

In order to help the view distinguish between various levels of content you can add a field to the content type that defines its level. You can then expose that field to views by selecting it as a filter and setting the value you want for that article. You can create multiple view pages within the View definition to address different filter settings needed for placement in each of your panel regions. By categorizing the menu-selection/articles and providing separate view pages (within the same View definition) you can refine your control of the displayed content.

You can also limit the number of articles displayed by a view by selecting the options under pager in the view definition page and telling how many pages/articles to display.

You can learn more about Views at nodeone.se

share|improve this answer
    
Thank you for your answers. in matter of fact i don't wrote this project from the beggining. I just want to modify for my own needs because last developer doesn't had time to make this changes. And that's the whole problem. To solve it i just wrote a jquery script that looks if there is div with second submenu (the orange box) and if so just hide the item box. if there is no orange box, show the item. Yeaaa, i know that's not the smartest way to do this but i don't want to digg this case till the end of my life :) Thanks for your attention. Cheers –  Kamil Apr 6 '12 at 10:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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