Questions tagged [navigation]

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

506 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
599 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 ...
5
votes
1answer
106 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 ...
3
votes
0answers
665 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 ...
3
votes
1answer
693 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' ...
3
votes
1answer
106 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 ...
3
votes
3answers
2k 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']),...
3
votes
0answers
649 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 ...
3
votes
1answer
190 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 ...
3
votes
1answer
412 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 ...
3
votes
1answer
860 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 ...
3
votes
1answer
365 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 ...
3
votes
1answer
148 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 ...
3
votes
0answers
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 ?
3
votes
2answers
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 ...
3
votes
1answer
94 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 ...
3
votes
1answer
2k 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 ...
2
votes
1answer
238 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 ...
2
votes
0answers
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 ...
2
votes
1answer
139 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 ...
2
votes
0answers
101 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....
2
votes
1answer
45 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 ...
2
votes
1answer
1k views

Defining module.links.action.yml with route parameters

How can I pass dynamically route parameters to module.links.action.yml? My code of module.links.action.yml: module.group_apply: route_name: module.group_apply title: 'Subscribe to group' ...
2
votes
0answers
102 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 ...
2
votes
0answers
517 views

Add awesome font icon to menu item

In my menu I want to add icons. Now when I look for a way to do this, I found a module called Menu Link Attributes. When I configure this on all my menu items, I can't only get it working when using ...
2
votes
0answers
190 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 (...
2
votes
0answers
56 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() ...
2
votes
0answers
30 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 ...
2
votes
1answer
62 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 ...
2
votes
0answers
172 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 ...
2
votes
0answers
26 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, ...
2
votes
1answer
37 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 ...
2
votes
0answers
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 ...
2
votes
0answers
220 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-...
2
votes
1answer
113 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
1answer
267 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 ...
2
votes
0answers
469 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% !...
2
votes
0answers
1k views

How can I modify the Quick Edit Module to have a better UX for end-users?

For a current project I'm working on we're trying to leverage the "In Place Editor" functionality provided by the Quick Edit module. Our main goals are to: Have a module that allows us to perform ...
2
votes
0answers
57 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-...
2
votes
0answers
154 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.
2
votes
0answers
92 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)?
2
votes
1answer
40 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' ...
2
votes
0answers
51 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 ...
2
votes
0answers
123 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 ...
2
votes
0answers
34 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 ...
2
votes
1answer
192 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.
2
votes
1answer
274 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 ...
2
votes
0answers
185 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 ...
2
votes
1answer
584 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
50 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 ...

1
2 3 4 5
11