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.

Filter by
Sorted by
Tagged with
3
votes
2answers
548 views

Where is links__node__node() defined?

I'm trying to figure out how I can alter the theme for read more links. This is what goes on inside the node.module ~ line 1380. $node->content['links']['node'] = array( '#theme' => '...
3
votes
3answers
1k views

Why is the “My account” link shown even if it is disabled?

In "Administration > Structure > Menu," I disabled the "My account" link, but the theme is still showing it. I took the screenshot after disabling the link, closing the overlay, and clicking the "...
3
votes
1answer
1k views

Empty cart functionality with a link, (no form) in Ubercart

I'm trying to make a link (not a form submit) to empty the cart; my link would be /cart/empty. I can't find where to make a case or something for the URL to work. I know I have to use uc_cart_empty(...
3
votes
1answer
132 views

Highlighting primary link for specific content types

If I have a navigation item called 'News' in my primary links, how would I go about highlighting it for all news content type nodes? Thanks!
3
votes
1answer
296 views

How to alter standard.front_page in module links YML file?

I have a menu with a "Home" link which was "provided by the Standard module. The title and path cannot be edited." I am trying to alter the text/link using my module's links.yml file like so: ...
3
votes
2answers
1k views

How can I bulk delete Menu Itemes in Drupal 8

is it possible to bulk delete and bulk edit menu items in Drupal 8? Question for Drupal 7: Any way to bulk delete menu items?
3
votes
2answers
3k views

How to create a url/link preview?

I'm managing a content sharing site built on drupal 7 and I would like to let users submit links as content. Is there a simple way of creating a thumbnail / preview of the link (like on facebook)?
3
votes
4answers
14k views

How do I setup download links for pdf files directly?

I want to add a pdf file via a file field on a content type, I want to display a download link, and if the user clicks save it to your computer, as in a normal download.
3
votes
2answers
2k views

How to place custom menu in user profile

I have created a user menu as shown below I am using Edit Profile and Me alias module and the menu system is as below Edit Account : user/uid/edit Edit Profile : user/uid/edit-profile Logout : user/...
3
votes
2answers
1k views

Is there a way to programmatically add new links to the primary links?

Is there a way to add links to the primary links using PHP in Drupal 6? The reason I ask is that I want to add more links in the footer of the web page, which I don't want to put in the top navigation ...
3
votes
2answers
3k views

Force all links to be absolute

I've a custom module I'm sending the content of node and views by email. The module first render the node/view and wrap the results around common template. But when my views and node content are ...
3
votes
2answers
651 views

How can I have the language-specific 'enabled' Boolean of menu items being respected?

I'm trying to translate the 'enabled' field of menu items in Drupal 8. So far I have written this code in MYMODULE.module file: function MYMODULE_entity_base_field_info_alter(&$fields, \Drupal\...
3
votes
1answer
993 views

How add menu to my node programmatically?

This is how i create my node : $value= array( 'type' => 'page', 'title'=>"First node", 'body' => array( '...
3
votes
2answers
1k views

Drop-down menu only works after clicking into the parent page first

I am using the Venture theme for Drupal 7. I have a 'Products' page listed in the main menu with a drop-down list that is a separate page for each product. However, to get the drop-down list to show ...
3
votes
2answers
158 views

How to create link libraries?

Is there a way around to build link library repository on a drupal site, so that there can be one place to edit the links and changes will reflect in the instances used else where (like body field of ...
3
votes
3answers
7k views

How to render a link as a button

I am using Drupal 7 and I would like to render a link (anchor tag) the same as a submit button. Does Drupal 7 allow for this (say by using the button type) or do I have to use CSS to accomplish this?
3
votes
3answers
3k views

Attach Galleries to Content Types

I am working with drupal 7 and I need to attach a gallery to the content type. I looked at the current solutions where I can create a Image content type and create node references. I am looking for ...
3
votes
3answers
2k views

Cannot hide Superfish sub menu on active pages

I am using the horizontal NavBar style with Superfish. When I'm in a section, I do not want its sub-navigation bar to show up. I only want to see the sub-pages listed whenever I mouse over the ...
3
votes
2answers
2k views

How do I add a node add link ( for a different content type ) in the node add form (drupal 7)

I'm overriding the node add / edit form using panels. One of the fields that I have added is using the auto complete widget (it is a node reference field). I also want to add a link underneath the ...
3
votes
2answers
2k views

use menu item title instead of page title in breadcrumbs

I have been trying to display the menu item title as the trailing item in my breadcrumbs, other than the page title. At this point, I override the template_breadcrumb() function with a custom ...
3
votes
2answers
2k views

Custom user registration email - Drupal 6

I want to add image icons for Facebook, Twitter etc with associated links and Join Us hyperlink like Join Us to the user registration email. Can anyone give me idea?
3
votes
2answers
2k views

How can I make the Book Navigation also show the Summary of the Child Page?

Currently the Book module will create a navigation of links to each of it's children pages. I need that navigation to also include a teaser or summary from the child page. This is for Drupal 7.
3
votes
1answer
224 views

How can I remove all contextual links?

When using the layout builder module, the contextual links module is a hard dependency. This works quite well in the context of the layout builder. But I don't want those links anywhere else, because ...
3
votes
1answer
613 views

Adding a query string to menu items determined by the current node?

I'm pretty new to Drupal 8. I'm trying to figure out how to programmatically add a query string to a menu item link, the specific query string is determined by the node/page the user is currently on. ...
3
votes
1answer
197 views

What's the right way to have a contextual link on controller action?

I just installed a custom module and created a controller with index function in it. I want to have a contextual link for this. I have following code in index function. public function index() { ...
3
votes
1answer
701 views

Render menu item children without being 'expanded'?

In Drupal 8, how can I render a menu links children without checking 'expanded' on the menu link? I am building a drop down that displays on hover, the links need to render. My code so far: {% macro ...
3
votes
1answer
2k views

How do I create menu programmatically?

I read through the Drupal 8 menu_api documentation in drupal.org. The example guide lists an option to create menu links and insert them into an existing menu. How does one create menu itself first ...
3
votes
1answer
41 views

Trouble with the menu Block module

I am trying to build pages with the main menu displayed in multiple locations. A "main navigation" with top-level items A,B,C,D,E; and each of these has children a1,a2,...b1,b2,... etc. There is a ...
3
votes
1answer
115 views

How to Reorder menus (not menu items)

I have the standard Main Menu, Management Menu, User Menu, etc., plus a bunch of custom menus. They are consistently shown in the same strange order (not in the order created, not alpha, not alpha by ...
3
votes
1answer
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 ...
3
votes
1answer
223 views

Menu link to the most recent article with a certain taxonomy term

I am using Drupal 7 and have been trying to figure out following: How do I make a menu link to the latest article that has been classified with a certain taxonomy term? For example, I want to have a ...
3
votes
1answer
291 views

Tabbed Multipage Ajaxified Forms

I need a way to create a form with tabbed navigation at the top, "save and next"/"save and back" navigation at the bottom, and saving the data for an individual page using ajax, with the following ...
3
votes
1answer
563 views

What meaning do the primary / secondary menu links have when it comes to SEO? [closed]

Is there some meaningful difference between the primary / secondary links when it comes to SEO? Do they carry a different weight from a search engines perspective? Thank you!
3
votes
1answer
354 views

Print the secondary links as expanded in a template file

I'm trying to print the secondary links for the main menu as expanded in my template node--products.tpl.php. In my menu I have three levels. -Products --Product category ---Product -Another menu ...
3
votes
1answer
769 views

Dynamic menu links using menu token

I'm trying to build a menu which has term id(tid) token in it to the views pages I have created. Menu links work when on taxonomy/term page but when menu links are clicked and url is changed to the ...
3
votes
1answer
145 views

How do I make drupal check for similar content?

Im using drupal 7 and Im looking for a solution or a module that when a user goes to submit a piece of content they are presented with a "similar content already submitted" list after they enter a ...
3
votes
1answer
1k views

How do I tear out the existing menu in a theme and replace it with super-fish (v7.x)

I know this is similar to the Bartik/menu question but I do not believe it is the same, here is the requirement. I am using "the morning after" theme in Drupal 7. This theme looks the way the client ...
3
votes
0answers
752 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
0answers
229 views

Menu active trail not working with facets [closed]

I'm using Facets and Facets API Pretty Path (https://www.drupal.org/project/facetapi_pretty_paths), together with Menu Trail By Path (https://www.drupal.org/project/menu_trail_by_path). Thanks to ...
3
votes
1answer
800 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
382 views

Module for menu positions [closed]

Are there any modules for custom menu positions like Menu position for D8? I am trying to make custom content types that show up in various places in menus based on certain rules. For example, ...
3
votes
0answers
663 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
205 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
489 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
864 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
367 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
150 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 ?

1 2 3
4
5
32