I'm using Drupal 7. I have a menu with links to specific views. They have links in menu with active trails - there is no problem with them. The views are based on a contextual filter connected with some terms from a Taxonomy dictionary. Every view has a different term.
For example:
View 1 (term 1)
View 2 (term 2)
View 3 (term 3)
View 1 (as page): has some links to content with term 1, View 2 (as page): has some links to content with term 2 etc.
The problem starts when I enter some link from Views which is assigned to that term. In the menu, active menu trail in the links is disabled.
How I can made it work? Could anybody send me solution for setting up a view in such a way that it will "talk" to the menu and set the active trail argument to link when it will be from that view?
I checked Taxonomy_menu and Taxonomy_menu_trails but it's not a solution.
OK, I know what is solution for that problem.
I need to use Context module. (CONTEXT UI)
As a requiments I need to add:
my view linked from View 1
term from dictionary
As a reaction:
Menu (linked to View 1)
It`s a really simple.
Related
this is my first website in Drupal 7, I'm trying to learn this framework, but I'm encountering a problem to which I could not find a solution yet.
I'm trying to create a page with a panel that has 2 views (as seen in this photo), the left view contains a list of categories (terms from taxonomy) and the right view contains a list/grid of projects (Content Type). Each project is of a single category and when I click on a category on the left side I want it to filter only the projects of that category on the right side, in the same page (or a new page with the same layout ../projects/category_term_1).
What happens now is that when I click on a category, I'm taken to a page that diplays the projects listed as taxonony term ( ../taxonomy/nr_taxonomy) different layout (like blog, but without categories on the left side).
I have aces to another project where the functionality that I want is implemented is a sort of similar type of pages. I tried to replicate all configuration from that site to mine, but the only difference that I'm able to notice is that the value of "STORAGE" column the administration/structure/pages is "normal" for my website and "in code" for the other site.
Site's layout:
https://www.dropbox.com/s/ep72wnpah42mdv3/site_layout.jpg?dl=0
Thank you!
I think your main view should use a contextual filter, based in the URL given. This way, the view would only show those projects in the specified category.
In the left view, you should show the taxonomy terms, but you should modify the URL given with your custom one: www.example.com/projects/taxonomyTerm
Hope it helps
I'm going to try to explain my project.
I have one section to create on my drupal's site called "Press Room" in this section the users access it via menu item called "Shows". The mainly idea is that the second level of this menu will be created with taxonomy vocabulary called shows and the terms of this are for example:
-Shows(Voclabulary)
-Heartland(term)
-Bulloch Family(term)
And now the next step is create for each one of the terms the next structure:
-About
-Press Materials
-Video
-Fotos
To be more specific I've attach two piece of wireframes of these.
What is the best way to do that?
Thanks!!
[The menu show like that][1]
![The content once you click in the menu][2]
http://i.stack.imgur.com/tijAU.png
http://i.stack.imgur.com/1oifQ.png
I can propose a solution although there are too many options here.
1) Heartland(term) -Bulloch Family(term): there is no need to use taxonomy terms, they can be node types (let's call it "Show" content type).
2) About, Press Materials, Video, Photos and Contact will be 5 node types too. But these will have a reference field to the node types above (Shows).
3) The display page of each Show will be a views that will display the node Show and the content that are referencing this node.
4) Menu can be created by hand (if shows are not too many) or by a views that will show a list of node links.
Examples:
http://ericgilbertsen.com/2013/06/create-related-content-blocks-drupal-7-views-entity-reference
http://www.webomelette.com/related-content-block-views-drupal-7
I have a news page that is a View that dynamically pulls in the latest news nodes. The actual view page was easily integrated into the menu. We are using the menu block module because we have the navigation split.
The problem is that any of the articles that the news view pulls in aren't associated with a menu, so when navigated to the menu block disappears.
How can we associate those items dynamically without having to manually add all news nodes as sub-items to the news page?
(We are on drupal 6)
Context module (drupal.org/project/context) allows you to create contexts based conditions, including path or node type, as well as reactions, such as displaying blocks or menus. You could set the context to your node type, and then create a reaction that displays your menus, sidebars etc.
i have got a menu structure like this:
-menu item level 1
--menu item level 2
---menu item level 3
all items are linking to the same node. now, if i visit the node only the first two items are displayed. what i found out is: when i change the link of the first level menu item to something else, all level get displayed right.
menu modules i use:
Menu block
Menu Settings per Content Type
Menu Trails
Administration menu
Auto Menu Title
Hierarchical Select
any ideas?
thanks
lukas
googletorp is right-- Drupal's core menu system isn't designed to handle this. However you can use a workaround.
Let's say that you'd like to create a nested menu in which one of the children links to the same path as its parent. Something like:
people/friends
people/friends
people/family
people/neighbors
This works in theory-- the menu items will take you to the correct page. But if you're relying on Drupal to correctly set the active trail and expand the correct sub menus, you'll have to use a bit of a workaround. You're basically going to create dummy nodes that will redirect to the desired page rather than creating two menu links that have the exact same path. The parent (in menu) will redirect to the child's node.
Method 1 (D6 only):
Download and install CCK Redirection
Create a Content Type 'Redirect Node' and add a CCK Redirection field to the content type
Create a page node (node 1) with URL "people/friends" and add a menu link
Create a 'Redirect Node' (node 2) and create a menu link for this new node.
Set CCK Redirection field to the URL node 1 (people/friends).
Set node 2's menu item to be the parent of node 1's
Method 2 (D6&7):
If you want to get really fancy, you can take a more user friendly approach by combining CCK's Node Reference module with the Rules module.
Download and install the Rules module (and Rules UI) and enable CCK's Node Reference module
Create a Content Type 'Redirect Node' and add a Node Reference (D6) (D7) field 'field_redirect_target'. Be sure to configure this so that it is required, and users cannot select nodes of type 'Redirect Node'
Add a new rule via the Rules module when content is going to be viewed if content is of type 'Redirect Node'
Redirect to page: [node:field_redirect_target-path]
Create node 1 of type page
Create node 2 of type 'Redirect Node'
Set Node Reference field to Node 1
Set node 2's menu item to be the parent of node 1's
This method is a bit nicer for users, since it doesn't require them to find the system path for the target node.
Depending on your setting, the menu module will show the active link it it's children. It is, however, not designed to search for more than a single link. This is why you wont get the full nested menu structure. My guess is, that the top one is the link it finds first, and that is where it stops. I can't remember the algorithm for the menu structure, you might have luck rearranging the menu structure, making menu 1 the last child. This is, however, not something the Drupal menu system is designed for, and you will not have an easy time changing this.
What are you trying to accomplish by linking the same node several times is a nested menu structure?
I solved my problem using menu first child. I didn't look at the code it uses, but it simply works. It's really a bummer that this doesn't work out of the box and you have to use such workarounds. But actually this increased usability for my case.
I'm trying to create a menu tree in drupal like this:
- term 1
node 1
node 2
- sub-term 1
node 3
node 4
+ sub-term 2
- sub-term 3
node 5
- sub-sub-term 1
node 6
+ term 2
etc.
(Sub-term 2 and term 2 are toggled closed.)
Some requirements:
Output this using something like JQuery Menu to get an interactive tree
Filter the nodes by cck type
Filter the nodes by cck field
Only have terms with nodes or other active terms in them show up
Mark the current node as such, and automatically open the tree to that point
Do I have to write this myself, or are there a combination of modules that can do it? I've got Advanced Taxonomy Blocks, which is pretty close, but it doesn't list the nodes.
Sounds like Taxonomy menu and the DHTML Menu module linked in the previous answer would get you pretty close. You'll need a view for your content to do the filtering. Here is an excerpt about Taxonomy menu from its project page:
Transforms your taxonomy vocabularies into menus with ease!
Features
Custom Menu per vocabulary
Uses the default taxonomy term path or custom paths
Integrate with Views
Integrate with Pathauto: use URL/path aliases
Does not interfere with other menu modules
I think this module will do what you want -- Taxonomy field menu.
It will build a traditional menu based on the connection between terms and nodes.
Just make your own custom menu and use the DHTML Menu module to make it expand/contract on click. Here is an excerpt from its project page:
... uses Javascript to reduce the number of page loads when using nested menus; this is particularly useful with Drupal's administration system.
Ordinarily in Drupal, in order to see the sub-items in a menu, you need to click the link of this item and wait for a full page load. After enabling DHTML Menu, clicking a menu link once will expand it to reveal its sub-items without reloading the page. A double-click on the item will load the page normally. Additionally, a cookie stores which menus are open and which are closed, so that the state of the menus remain consistent as you navigate around the site.