People who code: we want your input. Take the Survey

Questions tagged [navigation]

Use it for questions about navigation menus and links used in a site.

511 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
1answer
599 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
0answers
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
1answer
51 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
2answers
153 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
0answers
295 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
1answer
170 views

Add labels to superfish sub-menu <ul>s

Long story short, I'm building a Superfish menu structure that looks like the following: http://i.imgur.com/3h0KQGX.png]1 I'm using superfish & have everything in order except the labels on each ...
2
votes
0answers
189 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
0answers
326 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
0answers
141 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
4answers
3k views

use-ajax class for ajax link not working in dynamic content load

use-ajax class link not working when i load new content using custom ajax code, which has the use-ajax class links. I use normal jquery ajax to load the content because, i have drag and drop ...
2
votes
1answer
25 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
1answer
35 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
0answers
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
1answer
684 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
1answer
150 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
0answers
45 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
0answers
93 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
1answer
333 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
0answers
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
0answers
213 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
0answers
133 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
0answers
731 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
0answers
292 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
1answer
274 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
0answers
18 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
1answer
17 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
0answers
40 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
0answers
22 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
1answer
143 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
0answers
70 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
0answers
187 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
0answers
59 views

Can't add sub tab local tasks to admin/content/my_entity

I have a custom content entity list which has its own tab into admin/content/my_entity. The content of this tab is generated by using EntityListBuilder class. Actually, I created it with the drupal ...
1
vote
1answer
466 views

Is the homepage 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
1answer
478 views

How to tell if a menu link is route:<nolink> or not?

Trying to theme a menu in Drupal 8, running into a case where we need to add classes on certain links. In the case of a menu link that is route:<nolink> we need to not add any class at all. ...
1
vote
0answers
79 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
1answer
49 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
1answer
34 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
1answer
42 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
1answer
97 views

Custom submit handler on form loaded via entity.form_builder

Using Drupal 8.5.3. Currently working within a custom controller to load and alter a form for menu links. To load the form I am using the following: // Load the menu link field. $menu_link_content =...
1
vote
1answer
782 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
1answer
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
0answers
45 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.
1
vote
1answer
1k views

Add menu links to custom generated menu

I am working on a custom Drupal 8 module which generates a menu. Refer Create a new Menu in Drupal 8 programmatically for details. I have the menu now, but when I try to add custom menu links to it, ...
1
vote
0answers
16 views

Debugging menu build up: Where can I find the build-up code?

I encounter problems with the menu build-up (performed during cache rebuild). In order to solve my own problems I would like to follow the build-up process using debug. Where is the build-up done, ...
1
vote
0answers
602 views

Default menu.html.twig does not print below first level

Using Drupal 8, trying to integrate a custom theme we statically coded in house, and this is our first foray into Drupal 8. I copied menu.html.twig verbatim from the core directory into my theme's ...
1
vote
1answer
891 views

Possible parent values for parent of links

I am trying to create links in my Drupal 8 module, following this tutorial. So far, I have a link as follows in my module.links.menu.yml file: module.admin_settings: route_name: module.adminForm ...
1
vote
1answer
365 views

Load disabled items in a menu

I load my main menu programmatically with the following code : $menuTree = \Drupal::menuTree(); $menuTreeParameters = $menuTree->getCurrentRouteMenuTreeParameters($name); $...
1
vote
0answers
227 views

“Link wrapper” for '#theme_wrappers'?

I would like to build a render array, where the children html is wrapped in a link element. I am looking for something similar to '#type' => 'container' to achieve this. So it would translate to e....
1
vote
0answers
38 views

Management menu missing options

In the Drupal site I inherited, the Admin menu is missing both Modules and Appearance, making really hard to do anything. I've been tackling this issue periodically for months to no avail. How can I ...
1
vote
1answer
37 views

How to customize the “Read more” link in D7?

By default, the "Read More" link wrapped in the tag <li>. How i can change this tag to <p>? I tried to use hook theme_node_view_alter(&$build), but i couldn't find in $build required ...

1
2
3 4 5
11