Questions tagged [navigation]
Use it for questions about navigation menus and links used in a site.
516
questions with no upvoted or accepted answers
2
votes
1
answer
640
views
Add class in sub menu
I am trying to convert html to Drupal 7 theme.
function theme_menu_tree($variables){
return '<ul class="my-class-1">' . $variables['tree'] . '</ul>';
}
simply returns the entire menu ...
2
votes
0
answers
41
views
Drupal Navigation Title "Reset" to Use Page Title
Does anyone know if there is a way to "reset" a navigation title so that it falls back in-sync with a page's title?
Please find below scenario. Created a page with a title of "Page About Stuff." ...
2
votes
1
answer
57
views
Display external link using theme settings
I'm using theme-settings.php to store links to external pages (like Facebook, Twitter, etc.) and the links aren't storing correctly. In theme-settings.php, I have:
function ...
2
votes
2
answers
171
views
Modifying a single menu link title
I'd like to replace the link title on the top link of my secondary navbar (called "explorer", links to "mysite.net/explorer", but actually just triggers a dropdown-menu) with a glyphicon and the ...
2
votes
0
answers
315
views
How to render a Drupal 7 menu structure with divs instead of lists
I want to change the output of the Drupal 7 menu structure which is like:
<?php print render($primary_nav); ?>
outputs:
<ul class="menu nav navbar-nav">
<li class="first expanded"&...
2
votes
1
answer
187
views
Add labels to superfish sub-menu <ul>s
Long story short, I'm building a Superfish menu structure that looks like the following:
https://i.sstatic.net/hXdaz.png1
I'm using superfish & have everything in order except the labels on each ...
2
votes
0
answers
195
views
Superfish Menu - Submenus (Child Menus) first link is always ParentMenu link. How to remove this?
In my superfish menus, sub-menus (child-menus) show parent menu link as 1st option. Always. How do I remove this? See the photo for example:
2
votes
0
answers
329
views
Navigation not displaying in Omega 4 subtheme
I have made an Omega 4 subtheme cloned from the omega default starterkit using drush. I made a layout template based on /sites/all/themes/omega/omega/templates/system/page.tpl.php, and selected it.
...
2
votes
0
answers
148
views
How to reorder Book module menu through Database?
How to re-order Book menu faster, optionally through Database?
I have a big problem to reorder menu/ navigation for Book module....
It is supposed by drag-and-drop - I have 318 items in list , some ...
2
votes
1
answer
26
views
filter navigation, site content, etc
I am really new to Drupal, so this is a beginners question.
I need to create a website with a dropdown within the header, where visitors can choose a region (not a language, just a region, like "...
2
votes
1
answer
41
views
Sub menu creation
I need to create page level menus. User goes to a page off of the main menu and is presented with a sub menu. The menu items need to display / not display based on user roles - similar to the main ...
2
votes
0
answers
42
views
What to do for correct book navigation for 2 languages (always both book pages are shown)
We are using in productive system D6 (here it works!) and now we upgrade to 7.25 (it doesn't work). I have a problem to get the book navigation working in the right way. It shows always both languages ...
2
votes
1
answer
697
views
Theme template.php functions after bootstrap
I'm trying to print a drupal menu outside drupal. In order to achieve this I ran the bootstrap as follows:
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
And I render my menu as follows:
public static ...
2
votes
1
answer
181
views
What is the hook to alter links in the Book Outline tree?
What is the theme hook to alter links in the book outline like theme_menu_link__menu does for menus? Or is there a way to make theme_menu_link__menu apply changes to a tree view of the Books? Not ...
2
votes
0
answers
46
views
Changing the link in a Feature box to an external link
I am a Drupal beginner working with an already created site.
That said, I have been trying for days to change the text within the feature box to an external link. Currently, all of the text in the ...
2
votes
0
answers
95
views
Changing default overlay behaviour to not return to the top of the screen
I have a custom module which displays a page as an overlay, however when you click on the link it displays the overlay but the background page now returns to the top.
This behaviour can be seen when ...
2
votes
1
answer
346
views
Links in view - wrong language selection
Ok, I'm not sure where should I go with this problem, so forgive me if this is not the exactly best place for it.
I've created multilanguage site, of course, got many problems, but solved them all - ...
2
votes
0
answers
302
views
Nice menus error when implement in zen themes
I copied the following code:
<div id="navigation">
<?php if (module_exists('nice_menus')): ?>
<nav id="main-menu" role="navigation">
<?php
print theme('...
2
votes
0
answers
221
views
global link in views is displaying %3f etc
I have made a global text variable inside a view which I set as a link. This link contained parameters of the other fields found in the view. This is the link I set it for:
subscription_status?...
2
votes
0
answers
134
views
drupal webform url to edit existing response to question
I have a webform in Drupal, with 3 questions Q1, Q2 and Q3.
The users have permission to edit the responses to the webform, and view their own answers.
Hitting on EDIT link now takes the user to the ...
2
votes
0
answers
736
views
How to make submenu for tabs in Zen subtheme?
I'm working on my first subtheme for Zen and ran into a problem. The main menu is being display via tabs. Everything shows up fine, but I have no clue how to allow submenus (or dropdowns, whatever you ...
2
votes
0
answers
298
views
The Link Field module is not creating outbound links
The Link module is not creating external links. I put 'myurl.com' into the node field and the rendered a href is mysite/myurl.com. The title is being rendered correctly, but the links are relative.
...
2
votes
1
answer
210
views
how to include main navigation twice with different display
i started working with drupal 8 few days ago.
I am working on theming with Twig.
I included the main Navigation on the header, after the activation of twig debug mode , i followed the suggestion of ...
2
votes
1
answer
276
views
Zen header 'site name' + links issue
I'm using a Zen sub theme, and I've placed the main menu block into the header.
I would like to place the links to the right of the site name, but they only sit underneath. I've tried playing with ...
1
vote
0
answers
30
views
How to add menu to a region when viewing a node revision?
We have a layout with the menu in a left 'sidebar' region. The menu opens to the correct parent item when browsing a node as it should.
When browsing the latest (or any) revision of the node, the menu ...
1
vote
0
answers
116
views
Disable custom module Block Caching or force correct caching
I have build a custom module that builds out a list of child page links based on 'this' page's id.
Logged in it works as expected. But an anon user has problems which range from the block not showing ...
1
vote
1
answer
290
views
Custom Menu Template not Rendering Menu Links
I'm building a custom module that modifies the main theme (barrio bootstrap in this case) to establish a landing page. In that process, it hides blocks in some regions and takes over rendering the ...
1
vote
1
answer
518
views
How do I import/export menus?
I want to import/export all menus of site1 in into site2. Currently I am using the entitysync module to synchronize the content between two sites. I can see there is an option for "Custom Menu ...
1
vote
0
answers
46
views
How to disable menus from list of menus per role
I'd like to enable visibility per role of menus placed in /admin/structure/menu .
What I want is to allow, for each menu (Administration, development, Footer etc + custom menus), the possibility for a ...
1
vote
1
answer
594
views
How edit or alter the links in the secondary toolbar?
I'm on D9.3.x with Gin theme and Gin Toolbar.
I need to edit the link available in the secondary toolbar.
Namely, I'd need to hide the shortcuts link for everyone and hide the edit profile sub-link ...
1
vote
0
answers
26
views
How can I delete bogus links under /admin/structure?
I am running Drupal 9.3.4. I see four bogus links under /admin/structure. See the screen shot below. These were paths used by the Context module that were deleted. They are no longer listed under /...
1
vote
1
answer
721
views
Dynamic language links from menu?
I am trying to find a way to do the following:
Add languages to Drupal 9 menu items
Translate content/menu links
Provide (from the Main Navigation) a list of languages the current page is translated ...
1
vote
0
answers
79
views
Front menu not showing subitems
I've generated my menu based on the menu template from the stable theme
{% macro menu_links(items, attributes, menu_level) %}
{% import _self as menus %}
{% if items %}
{% if menu_level == 0 %}...
1
vote
1
answer
943
views
Restrict Menu Item Visibility by Permissions
I have a module-generated menu (using yaml file) with 5 menu items. My requirements don't allow me to restrict menu item visibility by role because roles can be dynamically added. So I have to do this ...
1
vote
1
answer
114
views
Set local actions - disabled/inactive
I am currently searching for a possibility to set an action to "inactive" depending on something.
I have found the hook_menu_local_actions_alter(&$local_actions), but do not know how I ...
1
vote
0
answers
71
views
systemAdminMenuBlockPage callback not respecting menu link permissions
I added a custom permission on "admin/commerce/config" to disable access for certain user roles.
class RouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
public ...
1
vote
1
answer
22
views
Some pages hide content unless "Read more" is clicked
If I have multiple pages on Drupal, some show the full page, and others say "Read more" and will only show the whole page when it is clicked. It doesn't seem to have anything to do with the ...
1
vote
0
answers
76
views
Different node parent menu for per language
My struggle with Drupal 8 continues as I moved onto i18n settings. I've enabled and configured content translation and now I'm facing issue of menu displaying untranslated pages. Popular suggestions ...
1
vote
0
answers
25
views
Local action on node but path a child of node?
I have created two local actions which I want to display on my nodes, General Configuration and Advanced Configuration.
General Configuration will show at node/%node, but Advanced Configuration is ...
1
vote
1
answer
507
views
Change Classes in Nav-Tag of Custom Menu
On a Drupal 8 installation, I have a menu in the sidebar first region. I want to add classes to bootstrap classes to the different levels of that menu. For that I created a my own menu template, which ...
1
vote
0
answers
135
views
How do you update node menu links?
I am creating Drupal 8 node using code and same time I am assigning a menu link as well its working fine. I am creating a menu using this code.
MenuLinkContent::create([
'title' => $item['...
1
vote
0
answers
542
views
Divide menu tree parents and children links into columns
I have the following menu tree for my main navigation:
Parent 1 (= level 0)
SubParent 1 (= level 1)
SubChild 1.1 (= level 1)
SubChild 1.2 (= level 1)
SubChild 1.3 (= level 1)
SubSubParent 1 (= ...
1
vote
1
answer
1k
views
Is the front page considered in_active_trail?
I'm learning Drupal 8, so still very new to it. I'm working on customizing the main menu. I've been able to add Twitter Bootstrap to my custom theme. I've made a custom menu--main.html.twig file.
I'...
1
vote
0
answers
162
views
Caching of sub site menus
Preamble
We currently have a Drupal 8 site that has subsites (accessed via subdomains).
On the main site (non-subdomain) we have a main navigation menu defined (this is presenting correctly on the ...
1
vote
1
answer
113
views
Unclickable Menu link keeps refreshing my page
Hello and sorry for my bad English. I am using Drupal 8 and i want to make a menu with categories. The menu title has to be CATEGORIES and when someone click on it, the menu has to show the categories ...
1
vote
1
answer
47
views
Alter menu link if logged in
I have a regular node in my main menu that:
if an anonymous user clicks on it, the node should be shown regularly
if a logged in user clicks on it, there should be a redirect to an external website
...
1
vote
1
answer
51
views
Leaving first-level tab selected when clicking on a subtab
I have a menu like the following defined in mymodule.links.menu.yml:
mymodule.page_memos:
title: 'List of memos'
description: 'View list of memos'
route_name: view.document_list.page_1
...
1
vote
1
answer
1k
views
Content edit links?
I'm new to Drupal 8 and can't figure out a way to show the edit contextual links for content displayed through the Views module. This was simple in Drupal 7, but in Drupal 8, a view only shows the ...
1
vote
1
answer
1k
views
Menu theme suggestion ignored when cache turned on
I have an alternative main menu that is used on specific node types.
When turning on the cache the menu block is cached. The theme suggestion for the menu is then ignored.
I tried to disable the menu ...
1
vote
0
answers
60
views
In Responsive Bartik, add collapsible menu toggle to wide screen?
Does anyone know how to enable the collapsible menu/menu toggle functionality that is part of Responsive Bartik on small screens to large screens?
It doesn't seem to be done solely by media queries.