Questions tagged [navigation]

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

513 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
2 answers
604 views

Adding Contextual Links to Ctools Custom Content Type Plugin

Ctools custom content type called Custom Panes shows contextual links when you have access permission and you hover over the pane (much like a block shows the contextual links) which allows you to ...
tthenne's user avatar
  • 83
5 votes
1 answer
109 views

YourTheme_links doesn't work on sub theme

I have tried the way described in http://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_link/7#comment-24463 But as it seems it works on the main theme but not on a subtheme. function ...
Lenin's user avatar
  • 101
3 votes
0 answers
421 views

Menu link tree only loads enabled elements in subtree regardless of parameters

When loading a menu tree without any custom parameters: $tree = \Drupal::menuTree()->load('my-menu-name', new MenuTreeParameters()); The returned tree \Drupal\Core\Menu\MenuLinkTreeElement[] ...
Anton's user avatar
  • 273
3 votes
0 answers
899 views

Drupal 8 Get Child Pages

So I am looking to fetch child page of current node for eg Birds - Great Blue Heron - Wood Duck - Willet Fish - Bass - Catfish - Tilapia When I am on Bird page I would like to show - Great ...
Sherry's user avatar
  • 31
3 votes
1 answer
1k views

Providing menu route parameter values from url

Suppose I have the following route in my ej.routing.yml file: ej.form.user.profile: path: '/user/{user}/ej_profile' defaults: _title: 'EJ Profile' _form: '\Drupal\ej\Form\User\ProfileForm' ...
r_honey's user avatar
  • 203
3 votes
1 answer
110 views

"Initial Menu Level" config in Block Layout not working

Using Drupal 8... Goal There are 2 regions in the header. The top region holds the Level 1 menu links while the bottom region holds the Level 2 menu links (or child links of the top regions). What ...
Chayemor's user avatar
  • 271
3 votes
3 answers
3k views

How to add onclick event to a link?

I need to create a link, which when clicked should be able to set a session variable. I have used l() function to create the link and tried this but this is not working. 'name' => l(t($n['name']),...
ana's user avatar
  • 143
3 votes
0 answers
723 views

Theming links in blocks using twig templates

I have a block for the language switcher. I want to override the links in it. I can override a specific language switcher block's markup, and I can override the links markup in all language switcher ...
NikLP's user avatar
  • 993
3 votes
0 answers
255 views

Creating field on each node

I want to add a field on each node which links to a particular page where module's controller will act. I want to actually add a link at bottom of node, and I want to do this programmatically. But I ...
holdnet's user avatar
  • 81
3 votes
2 answers
685 views

Link tags in template file auto closing.

I’m having an issue wrapping a link around some output in a template file. I have the right template file; and I can put text like ‘start here’ and ‘end here’ and it prints out where I want the ‘a ...
Deejay's user avatar
  • 670
3 votes
1 answer
869 views

Taxomony menu - show all, vocabulary link are disabled

I have a custom vocabulary which looks something like this: Shops (vocabulary name) Sporting Goods Auto Parts Computers Etc. (15 items in total, 1 level) My goal is to create a menu link to Shops ...
gskema's user avatar
  • 131
3 votes
1 answer
376 views

How to pull pictures and summary information from external web pages when posting links?

When posting a link (external web page) to my Drupal blog, is there a way to have Drupal automatically pull the picture and summary information from that link and include it in the post on my Drupal ...
Randy S's user avatar
  • 31
3 votes
1 answer
156 views

Override and add a link to a themed table

Using a custom module, I'm trying to add "Schedule" links to each of the rows of the table on node/%nid/revisions, but can't seem to figure it out. Do I have to override the entire function ...
gmclelland's user avatar
3 votes
0 answers
40 views

How allow users to add menu entries only in second level?

i want my users to be allowed to add links only to the second level or lower of the main menu, but not to the first. How can i do this ?
oll's user avatar
  • 724
3 votes
2 answers
1k views

Show menu link descriptions for a custom navigation menu

I have the following navigation, displayed in page.tpl.php: theme('links', array('links' => menu_navigation_links('menu-site-navigation'))); There are four navigation elements that show up. I ...
kylex's user avatar
  • 1,389
3 votes
1 answer
96 views

Article view with links to other articles

So I'm trying to create a view which displays the most recent article belonging to a specific taxonomy term and pulls out just the links to other articles which have the same term. I want to display ...
KaushikTD's user avatar
  • 179
3 votes
1 answer
3k views

Why does jQuery slideToggle revert back to initial hidden state after running?

I have a Superfish menu and a simple jquery slideToggle animation attached to each menu item. I am using Drupal 7 & the Superfish module. The idea is that on click it will show the body content ...
ricardoom's user avatar
2 votes
0 answers
140 views

Disable the "Add Link" button in entity.menu.edit_form for certain roles

I'd like to hide the "Add Link" button in menu.edit_form for certain roles. Running dpm($form) for this form I can't find that button in there. In core there is menu_ui.links.action.yml with ...
macbert's user avatar
  • 313
2 votes
0 answers
44 views

At creation time, why are shortcut titles translated, but menu link titles are not?

The idiom that the community points to for creating menu links usually looks like this (from \Drupal\Tests\language\Functional\LanguageSwitchingTest::testLanguageSessionSwitchLinks()): // Add a link ...
GuyPaddock's user avatar
2 votes
1 answer
111 views

When I clear cache, my menu ordering seems to go out of order

When I clear cache, especially on high traffic times, my menu seems to go out of ordering. Usually I don't see any log messages except for one time: Message Drupal\Core\Database\...
Taylor's Designs's user avatar
2 votes
0 answers
130 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 ...
JetSet's user avatar
  • 147
2 votes
0 answers
101 views

Menu item URL not updating using MenuLinkManagerInterface::updateDefinition()

When trying to update an existing menu link URL/ URI with updateDefinition() - https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21MenuLinkManagerInterface.php/function/...
wilNev's user avatar
  • 433
2 votes
1 answer
377 views

main menu link as language switcher

I have 2 language and these situation: main menu -> lang1 -> link to www.foo.com/ main menu -> lang2 -> link to www.foo.com/en All sites when switch manually on browser the language, But my main ...
theman whosoldtheworld's user avatar
2 votes
0 answers
54 views

How to add "#" as a menu link?

How can I simply add "#" as a menu link in Drupal 8? I want to have: <a href="#" ... output as a menu link. Do I have to define my own route token akin to <nolink> and write a custom ...
Kevin's user avatar
  • 27.5k
2 votes
1 answer
264 views

Load menu items from one menu in other menu

I want to load the menu items from the main menu in a other menu. I've read a dozen examples but I can't get it to render the items at all. Here's my code from my_theme.theme function ...
Kazuto's user avatar
  • 31
2 votes
0 answers
131 views

How to get the specific field raw data in node.html.twig

I am using link field in a couple of content types, but when I am trying get url from node.html.twig with content.field_my_link_field and have tried some suggestions like content.field_my_link_field....
Marko's user avatar
  • 21
2 votes
1 answer
87 views

View or module that shows which nodes are linking to the current node?

Has anyone found a way to show which pages (nodes) have internal links to another page (node)? This could be a view that shows a listing for each node of a particular content type and then all the ...
Eric Wenger's user avatar
2 votes
0 answers
111 views

internal:node/x - wrong link

In my Drupal 8 multilingual site I used the link field and set it to "only internal links". If I save them, I now get the following: <a href="internal:/node/29" target="_blank" tabindex="0"> I ...
SvenV's user avatar
  • 21
2 votes
0 answers
305 views

Why does getActiveTrailIds() return nothing for view pages?

MenuActiveTrail::getActiveTrailIds, though it works consistently for node pages on a menu, doesn't return anything for Views that appear on the menu in exactly the same way. See this demo site which (...
rphair's user avatar
  • 159
2 votes
0 answers
60 views

User menu on 404 pages

On 404 pages, no user menu is displayed. I have tryed to use the 404 Navigation module but it does not help. I also tried this code in template.php, but it doesn't work. function bartik_user_menu() ...
ttt's user avatar
  • 75
2 votes
0 answers
33 views

Build a hierarchical menu with multiple nodes location

I look for one (or more) module (s) to allow me to have an organization such as in Drupal 7 : A node can be in one or more section of the menu It will have its own URL to reach each of its sections ...
Christophe CARON's user avatar
2 votes
1 answer
76 views

How to add link title in combine field filter

my view having combine field filter.it is working based on link field. the link field title is "test" and the url is "http://example.com".when i search using "test" it is not showing any result.if i ...
udhaya kumar UK's user avatar
2 votes
0 answers
182 views

Modify URLs generated by CKEditor Link for specific node type

How do you alter the URL generated by CKEditor Link, for a specific content type. For example I have book_section content type. If a content editor links to a node with type of book_section I want to ...
Andrew's user avatar
  • 302
2 votes
0 answers
42 views

Make menu link expand instead of redirect

Let's say that I have a following menu: A A1 A2 B Which looks like this: When somebody clicks on the arrow on the right of A (or in the empty space on the left of the arrow) the submenu expands, ...
user1's user avatar
  • 143
2 votes
1 answer
45 views

mapping of menu Name "Main Menu" with variable name: primary_nav

I am new to Drupal and would like to know the details of constant/global variable: $primary_nav Observed this variable is pulling list of links from a Menu with Title : "Main Menu" . I try to ...
Santhosh Nagulanchi's user avatar
2 votes
0 answers
2k views

Drupal 8: How to create accordion View with table inside?

I'm trying to generate a accordion grouped by year. I have used Accordion module for this. It is giving accordion which is fine but I want data inside accordion in tabular format. For ex: Table ...
Sugandh Khanna's user avatar
2 votes
0 answers
235 views

Show main menu in Foundation 6 Off canvas by loading a different twig template

How do I load my Primary menu in my Foundation Off canvas region off-canvas position-left? In menu--main.html.twig I have below structure for my desktop menu: <div class="top-bar nav-desktop show-...
meez's user avatar
  • 1,333
2 votes
1 answer
193 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 ...
Meher Jebali's user avatar
2 votes
1 answer
294 views

menu item for current page is missing a href tag for anonymous user

drupal 8: Theme used "bartik". If user is logged in, the active menu item has an <a> - tag, if not the tag is missing. Is this the expected drupal behavior? btw. the same happens on the ...
wuwu's user avatar
  • 56
2 votes
0 answers
563 views

Set Width full 100% item sub menu in TB_Megamenu Drupal 7

I used module tb_megamenu Drupal 7 which version "7.x-1.0-rc2" ! I had three item submenu . The first and second sub show list text ,but three sub show all group. I want three sub menu set width 100% !...
Henry Tran's user avatar
2 votes
0 answers
70 views

Gallery pagination: next/prev button loop same page items (views_navigation)

Hope someone has resolved this: Scenario: I'm on a gallery (of 3) with several pages, when clicking on any image a page opens with a bigger version of that image. http://example.com/gallery/bol-dor-...
Mauricio's user avatar
2 votes
0 answers
212 views

One-time registration email link

I need to send to specific persons one-time registration email links, in order to create users with specific roles. The "normal" registration should be available as well.
Fernando Pap's user avatar
2 votes
0 answers
97 views

How to get Breadcrumb Trail from a book page?

if given that we know the nid of a page in a book, how to construct some breadcrumbs or hierarchy from top of the book to the current page (nid)?
Mohammad Irfan's user avatar
2 votes
1 answer
42 views

Print current drupal menu level

Hitting my head against the wall here. I've volunteered to print a list of the current menu items (at the same level as the currently viewed menu) print theme('links', $secondary_links, array('class' ...
Enviro's user avatar
  • 21
2 votes
0 answers
52 views

Links to Wordpress shop from Drupal menu add Base URL twice

I'm working on a site that has the main site built in Drupal and the shop is built in Wordpress/Woocommerce (messy I know - not my choice). The problem is that when I link to a product in wordpress ...
zen_mind's user avatar
2 votes
0 answers
129 views

Breadcrumbs not showing parent, just Home > [insertPageNameHere]

[insertPageNameHere] is just a placeholder. It displays things like Home > About and Home > News and Home > How to carve wood But not Home > News > How to carve wood which is what I ...
tskjetne's user avatar
  • 131
2 votes
0 answers
35 views

Views automatically adds = inside link when output as link

I am trying to create a view of the latest posts from a vbulletin forum through external.php. As external.php can publish both in RSS and XML format, I have installed views_xml_backend in order to ...
Casper HH's user avatar
2 votes
1 answer
285 views

Link field with Browse Server button

Is it possible to add the Browse Server button on Link Field? So user can link to and see internal file or image? I have tried the Linkit module, but that is not really what I want.
CocoSkin's user avatar
  • 889
2 votes
1 answer
328 views

Can't override module css for Mega Menu in Zen theme

I am a fresh convert to Drupal and still a novice overall. My problem seems simple, but I just can't figure it out. I installed a Zen theme, then a Mega Menu module. I am in the process of styling ...
Kipling79's user avatar
2 votes
0 answers
262 views

Alter node menu local task weight of "View" and "Edit" for a content type

I want to alter the ordering of the node tabs for a particular content type. From this: View, Edit To this: Edit, View I tried with using menu_local_tasks_alter like this: function ...
kopeboy's user avatar
  • 53

1
2 3 4 5
11