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
2k views

Next/Previous button for nodes within a book

I want to have Next and Back buttons for nodes within a book. What is the easiest way to achieve 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 ...
3
votes
3answers
852 views

External menu link within same domain

Call me stupid, but I currently have a site that is using both Joomla and Drupal (long story). The site uses a number of sub-domains to represent different geographic locations. For the main menu in ...
2
votes
2answers
4k views

How do I make an internal link with CKEditor?

I am using Drupal 8. Using the standard WYSIWYG editor, when I click on the link button, I only get the option to add a url. I would have thought there would be some capabilities to look up existing ...
2
votes
1answer
1k views

How to add Title attribute to Menu links?

Is it possible to add Title attribute to Menu items? If so, how?
2
votes
3answers
5k views

How to create footer links

Does anyone know how to add link such as about us in the footer region. i am using the zen theme. Further, How do you redirect people to the login or register page from pages such as upload, thus if ...
2
votes
3answers
2k views

How to change title of “Log in” link in account menu for anonymous users?

How to change title of "Log in" link in account menu for anonymous users in Drupal 8? Thanks for any suggestions.
2
votes
6answers
13k views

Bootstrap dropdown parent link not clickable

This is the first drupal project i'm working on and i'm having the following problem. I have my dropdown menu set up as followed: The problem is that the parent link "Materialen" is not clickable ...
2
votes
2answers
5k views

use URL with query as URL destination

I mean can we have something like this? url with double ? in drupal? http://drupal.org/?destination=xxx/yyy?token=zzz
2
votes
4answers
3k views

How to migrate Link Fields ('title' and 'url') involving local variables?

I have performed the following query: $query = db_select('sage.USER', 'USER') ->fields('USER', array('USER_ID', 'OFFICE_ID', 'USER_PASSWORD')) ->range(0, 1); $result = $query->execute(); ...
2
votes
1answer
942 views

What are the contextual links?

Drupal 7 defines the "use contextual links" permission. Which links are defined as contextual links?
2
votes
1answer
203 views

How are links rendered?

In Drupal 8, what code determines if a link is output as text, or an anchor tag with text? I have entered a route:<nolink> item in the menu, but the output is this: <span target="" data-...
2
votes
1answer
3k views

Translate routing and menu titles

I've made two yml files, for both routing and menu item: Route: tester_helper.products_controller_overview: path: '/assortment' defaults: _controller: '\Drupal\tester_helper\Controller\...
2
votes
1answer
2k views

“is-active” class on all menu levels

My main navigation menu is visually split as in the picture: Level 1 is visualised in the upper-right corner, level 2 below. Technology (like all the current items in level 2) is child of About. In ...
2
votes
3answers
2k views

Edit “Read more” and “Add new comment” links in teaser

I'd like to add a couple classes to the "Read more" and "Add new comment" links in my article teasers in Drupal 8. I'd do this in Drupal 7 by doing something like this in my theme file. function ...
2
votes
3answers
912 views

How to stop the jquery element being added on ajax requests

I've added a toggle for my superfish menu, it works fine but for every ajax load or colorbox trigger the span is created multiple times. How to fix it??? (function ($){ Drupal.behaviors.customjs = { ...
2
votes
1answer
2k views

Add custom class to link outputted by views

I'm using views to output a link. The user gets two fields in which to add the href and the text on the link. I wan't them to be able to put a class on the link as well. How can I do this? In views I ...
2
votes
4answers
6k views

In Drupal 7 how do I add an anchor tag to a path alias menu link

I created a node in drupal 7 and given it a url path alias of 'testing'. When I try to create a menu item that links to the path alias with an anchor, it throws an error If I do node/1#this it ...
2
votes
3answers
2k views

Is there a way to show different Amazon affiliate link based on visitor locations?

I'm trying to get an Amazon affiliate link set up that directs the visitor to their local store, rather than being fixed to one particular store. I know I could set up individual links for each ...
2
votes
1answer
247 views

Bartik Home link to be uppercase

How can I make "home" link on bartik menu uppercase and instead name it "front page"? I tried by going to edit it at structure-menus-main navigation and i cannot because it says "This link is provided ...
2
votes
2answers
1k views

Multi Column Menu

Is there some easy way to create a multi-column (or grid) menu, eg: item 1 item 4 item 7 item 2 item 5 item 8 item 3 item 6 There are no parents in this menu. I would rather not install a ...
2
votes
2answers
841 views

How to create a specific menu for specific users?

I'd like to know how can I create a menu like so: Menu X which appears when a Member X performs a login, for example when a simple user login, a Menu with 4 sections appears but when a Member Y (for ...
2
votes
1answer
199 views

How to override entity:link() function?

I have an entity with entitylisthandler. In entitylisthandler, i have a function to build row like: public function buildRow(EntityInterface $entity) { /* @var $entity \Drupal\mymodule\Entity\...
2
votes
1answer
3k views

Rewrite title to download file?

I have a content type with a file field. In a view I am trying to make the title link to the document. So that when someone clicks the title it downloads the file. In Views for the title field I ...
2
votes
1answer
2k views

How to redirect to l() function link after login?

I'm having a Simplenews newsletter template with a link guiding newsletter readers to a intranet site with more news. <?php print l('hier.', 'node/' . $build['#node']->nid, array('absolute' =&...
2
votes
4answers
623 views

How to add a class for forgot password link?

I need to add a class for the forgot password link. How can I do using Drupal? This is the actual link: <a href="/user/password" title="">Have you forgotten your password?</a> My ...
2
votes
2answers
70 views

What is the replacement for menu_link_load()?

Drupal 7 has menu_link_load() to load a single menu item. What is the Drupal 8 equivalent?
2
votes
2answers
268 views

How to check “Show as expanded” by default on the Add menu item page

I need the 'Show as Expanded' checkbox on the Add menu item page to be selected by default. I created a module, 'expand_menu_items', and tried a hook_form_alter function to get the id, apparently it'...
2
votes
2answers
125 views

Render in page link

How can I render an in page link, like: <a href="#xyz">abc</a> I tried: $options = array('fragment' => 'xyz'); $link = Link::fromTextAndUrl(t('abc'), Url::fromUri('internal:/', $...
2
votes
1answer
428 views

how do I get the depth of a MenuLinkContent?

I'm using the sitemap module and i need to get the menu link depth in my preprocess function (template_sitemap_menu_link). I'm trying to do that by accessing the MenuLinkContent object with $...
2
votes
1answer
2k views

How to remove 'destination' query paramater from link URLs in Drupal 8

For some SEO related reasons, I want to remove the destination paramaters that are attached to the login and register link urls below nodes. The Link-URLs look like this: http://example.com/user/...
2
votes
2answers
943 views

Don't link menu in the active page

My Q is equal as Remove link from active page in menu I need the active page in my menu not to be a link. So let's say I'm on the services page, I need my menu structure to look like this: &...
2
votes
2answers
4k views

How to create navigation menu on sidebar with different navigation links displayed on different pages?

I am using Drupal-7. I have created Dropdown menu with Megamenu. Now, I wanted to create navigation menu on left side that menu items will be different on each page. I have created navigation block ...
2
votes
2answers
676 views

Possible cause of the one time login link sent via e-mail to be broken?

edit: it appears to be a bug, reported here https://www.drupal.org/node/2329723 When I, as the Admin, add a new user and let Drupal notify him via mail, the one-time login link is broken: http://www....
2
votes
1answer
861 views

Drush make command error when unzipping superfish module / library

I am moving a website from my local machine to the prod server. I intend to do this with drush sync, looks like the most straightforward way. So, I've created a makefile on my local website, when i ...
2
votes
2answers
2k views

Custom navigation menu bar

I use the main menu as navigation bar, and I would like to obtain the following result: When the mouse is hovered on one navigation item, the sub menu should be shown as <div> under this item. I ...
2
votes
3answers
6k views

anchor (#) in url alias

I want to open same page from different contents. So I need to generate link like /testimonials#group-1 for these contents. I used pathauto module for this. I made pattern for this category ...
2
votes
1answer
61 views

Avoid duplicated external links

I would like to add a section on my website (Drupal 7) which consists of articles with external links (as source). To avoid spam and duplicated content, I would like to avoid that users may add a URL ...
2
votes
1answer
560 views

Link to small .php script on drupal page gives 404

I am new to drupal and have a page set up with a bunch of links. When clicked, the links are supposed to open up a php file (player.php, located in the root directory) in a new window. However, all I ...
2
votes
2answers
4k views

Send different email response based on form options?

I need to set up a Request Download form in which users choose which software they want from a drop-down. Is there any way to make it, so they are sent a unique email for each software? If not, is ...
2
votes
2answers
185 views

how to create a link to mysite/user and how to theme mysite/user?

I have searched for this for some time and the only thing that pops up is how to create/customize your own login/register page. I would like to add a link to the default Drupak 7 login/register pages ...
2
votes
4answers
2k views

How to change the link target in a entity reference display?

I'm on d7. I have two content types on my site, "link" and "Article". The link content type contains a link field from the link module that users enter a link to another site in to. I have the "link" ...
2
votes
1answer
2k views

How do I customize the comment reply link?

I'm trying to customize the comment reply link to direct the user to the comment submission form on the same page. I've tried: <?php $content['links']['#links']['comment-reply']['href'] = '#edit-...
2
votes
1answer
2k views

how to make an automatic download button?

I have a Content type with a file field. I want to add another field (download button) which when users click on that, they would be able to download the file (uploaded in file field), and show file ...
2
votes
1answer
161 views

How to add local task links to referenced entities for a specific content type?

I have a content type with some entity reference fields to another content types. I want to add local task tabs to the node view page, to link those referenced node. However I cannot figure it out how ...
2
votes
1answer
56 views

How do I add an extra “Add content”-link to the admin toolbar dropdown

I am trying to add some improvement to the workflow of the webmasters. Right now they have to click "Content", and then click once more on the "Add content" button. Since I am working with the "Admin ...
2
votes
1answer
334 views

How to make menu items of restricted pages visible to all user roles?

On a website I'm working on, logged in users can post their feedback about some functionalities which the website provides. While only logged in users should have access to fill the form, invisibility ...
2
votes
1answer
678 views

How to add a contextual action link to a View?

I want to replace the default EntityListBuilder from a custom entity with a View, as it is much quicker to build that list interface with it. However I want to retain the action button from the ...

1
3 4
5
6 7
32