A hyperlink or link is a reference to data that the reader can directly follow, or that is followed automatically.

learn more… | top users | synonyms

0
votes
1answer
12 views

How to link to live chat TawkTo module pop up window with Drupal 7?

I have Tawkto module installed, and I want to create link on my main menu for: "Live Chat" The link is: <a href="javascript:void(Tawk_API.toggle())"> Click to Chat </a> Now this ...
1
vote
1answer
23 views

How to create link to a view

I've a view with a page display on url "progetti". On my controller I'm trying to create a link to this url but I can't find the right way. I've added \Drupal\Core\Url namespace on top of the file. ...
0
votes
1answer
33 views

How to open a link of node in custom region?

I create a custom region in sub-theme. I have constructed a map, on which there is a markers when you click on a link (Image 1) description opens on a full page (as on Image 2). How to open a ...
1
vote
1answer
48 views

Internal path in twig template

I'm trying to link to a Drupal path like "Contact Us" in my Twig template. I've tried this code in my Twig template but I can't get any result. <a href="{{ contact }}">{{ 'Contact'|t }}</a&...
1
vote
1answer
54 views

Add “read more” link on User Profile Teaser Display

I'm using Drupal 8 and I want to have a "Read More" Link on my Userprofile, that links from the Teaser Display to the Full Display. How can I do that? Content Types for Nodes bring the "Links" Field ...
0
votes
0answers
36 views

Get current language in block

There is a twig file named link--language-block.html.twig and I'd like to get current language in there. In front page (page--front.html.twig) it can be done using {{ language.name }} . But, it ...
2
votes
1answer
83 views

Generating arbitrary internal URLs

I'm generating the URL inside a controller in a custom module. The URL I generate is to pages on the same site, but not in the module. I want to append an arbitrary number of slugs to the end of the ...
2
votes
1answer
30 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 ...
0
votes
2answers
35 views

Restrict the node local tabs access to specific content types

I have a module_name.links.tasks.yml file for Drupal 8, whose content is the following one. entity.node.module_admin: route_name: module_name.admin base_route: entity.node.canonical title: ...
3
votes
2answers
37 views

How to pass variables into link path within l() function?

I am wondering how to pass variables into a the path argument for a link created with l(). The path looks like registration-history/listing/$node->nid/$sku/$node->created/$start_date And the ...
1
vote
1answer
25 views

Wrap link around an element in twig

I have a twig template for a custom block, I want the entire block to be wrapped in a link. I'm using the link field, but I'm not sure how to get the url from the field within the twig template. This ...
1
vote
0answers
10 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 ...
0
votes
0answers
27 views

How do I get a custom help text on a link field if title of the field is hidden?

I created a link field, and disabled its title, put some custom help text for the link field. It only shows the default help text underneath, like below but with no custom help text. Start typing ...
0
votes
1answer
19 views

How to open quicktab tab from external page (after clicking link url)

i have a slider with link field at my front page, and quicktab section on another page. The slides and the quicktabs are connected, so i want when i click on the link at the slider to open the ...
2
votes
0answers
34 views

Is this a good way to display a hyperlink separate link text and URL in field.html.twig [closed]

I have a link inside a block, I want to display separate text and url without using link-formatter-link-separate.html.twig So I write this code field--block-content--field-link-1.html.twig: {% for ...
1
vote
0answers
11 views

Links in view do not lead to current language content

I have a Drupal 7.50 site with menu and content on the left side and a list of nodes on the right side. The Menu has a language switcher. When language changes the links from the nodes on the right ...
1
vote
3answers
123 views

Login / Logout Link in Main Navigation Menu

How can I add a Login link to the "Main navigation" menu? When a user clicks on the link, it should take them to the /user/login page. Once they login, the link should change to say "Logout" instead ...
0
votes
2answers
24 views

add base url before field text content

I have a text field used to enter a code (like 1111). This code is linked to a file (image) hosted in another server. When a user displays this content type, I want to automatically display 3 things :...
1
vote
0answers
60 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 ...
2
votes
3answers
118 views

How to create a Node Info Bar (or Node Info Block)?

I want to create a teaser with 3 sections: Title Section. Information Section (Info Bar): When this Node Writed? (Date & Time). Whom is writed this Node: (Author of Node). What category ...
1
vote
0answers
19 views

Entity Admin UI as Node Tab Link

I have an entity "metric" that has specified the following admin ui config: 'uri callback' => 'metric_entity_uri', 'admin ui' => array( 'path' => 'node/%/config', '...
0
votes
2answers
46 views

Alter the access of menu link before rendering

I need to alter the access of menu links before being rendered. In Drupal 7, we used hook_translated_menu_link_alter() for it. Drupal 8 change records show that there are no direct replacement for ...
1
vote
1answer
27 views

CKEditor Link a content with rule as a hypelink with title and url to a custom field

I would like to add a hyperlink entry in a blog which points to a internal content URL with different content type which needs to be display for authenticated users. 1.) The hyperlink should show the ...
0
votes
0answers
16 views

Programmatically alter link path

Some of my pages generated by views have paths containing commas. The Drupal 8 language switcher block encodes the characters in the url replacing commas with %2C. How can I write a preprocess ...
1
vote
1answer
27 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\...
0
votes
0answers
23 views

Tweetbutton module tweet icon no longer included inside links in d7

In d6, the code in the hook_link function of the tweetbutton module to handle including the tweet icon in the links was: function tweetbutton_link($entity_type, $entity, $teaser = FALSE) { $...
0
votes
0answers
19 views

Menu hierarchy expansion behavior for child-link that is a child of multiple parent links

When adding a page that will have a menu-link that is a child of parent menu-link (parent-1) you are able to select the 'Menu link title' and a 'Parent item' on that create/edit form. The link ...
1
vote
1answer
27 views

If linking entities with a multi-value entity reference field, what about properties of the association?

In this thread I need a link from base table to join table it was suggested that it is better in Drupal to join two entities with a multi-value entity reference field than to use a relational style ...
0
votes
2answers
44 views

Anchor links not working in Firefox

So I know this might not necessarily be a "Drupal" issue, but because I am using Drupal and this issue only happens in my Drupal site, I'm wondering if it has something to do with the way Drupal ...
1
vote
2answers
41 views

How do i mark html TRUE in l()

In Drupal 7 we have option to mark HTML=>TRUE. How can i do it in Drupal 8 my code is $create_icon_path = 'my_icon.png'; //my icon path $create_icon = '<img height=15 src = "/' . $...
1
vote
0answers
23 views

css last clicked link menu/no menu

I have searched and searched and found many possible solutions but none of them work for me. I have a very odd website setup (the client wants it that way) Setup (all next to each other): Main menu (...
1
vote
2answers
49 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 ...
0
votes
1answer
20 views

How to render the main menu in alphabetical order regardless of menu link weight?

We are using the main menu of Drupal to build out the main navigation of the site. The content creators have access to add a menu link for a node in any level of the main menu and they are also able ...
0
votes
1answer
22 views

Admin links issue

So if I am in my admin section http://example.com/admin/content and I try and click on http://example.com/admin/structure The url is http://example.com/admin/admin/structure I set the base_url ...
0
votes
0answers
14 views

size chart link

I have a drupal commerce website with different products like shirts and pants etc... On product detail page I want show a link to display the size chart. For shirts the size chart is different and ...
1
vote
3answers
59 views

How to display all links of the Answers module on a single page?

I using the Answers module, which provide the various set of views as shown in the image below. But it does not provide anything where we can provide these views as a link. I mean I want all these ...
0
votes
2answers
120 views

Show menu links for anonymous users only

I need to show the user register link as a menu item in the account menu. I am able to add the link in the menu via links.menu.yml. The menu links shows up for anonymous users as well as ...
1
vote
2answers
37 views

Views: add (link to file field) to image field

In D7, I have an event content type containing an image field ("Featured image") and a file field ("Document"). I have a view of events containing documents, and would like to wrap a link around the ...
1
vote
0answers
23 views

Force all URLs to be absolute

I have installed the following modules: Pathologic Advanced Aggregation I implemented hook_link_alter() where I set $variables['options']['absolute'] = TRUE;. This helped with fixing: All ...
0
votes
0answers
12 views

Alter path of sub menu item when the user is on edit page

I want to alter the path of a sub-menu item which is been created from the core menu module from UI only. I wanted to change its path based on the url I tried implementing hook_menu_link_alter(&$...
0
votes
0answers
6 views

custom link and field update

I'm wondering if and how it can be done. I'm having a dashboard built. Basically, a quicktab using views. In one of these views, there are "custom fields" where I show icons. Some are basic edit link ...
1
vote
1answer
222 views

How to alter language item link html in Drupal 8

I am looking to modify the default output of Drupal 8 of links in a certain situation, the language switcher. Ideally I want to be able to do that in a twig template and not have to produce a massive ...
2
votes
1answer
421 views

How to get the valid URL of a Link field from within a Twig template?

I have a Link field named field_my_link (machine name). Within a Twig template I can get the link's URL value with this: {{ node.field_my_link.uri }} If inside the Link's URL there is an external ...
3
votes
1answer
72 views

Customize the HTML of a link field from a custom theme

I've a Link field named field_home_link, attached to a Content Type named Home, and I'm trying to customize how it is rendered as HTML from inside a custom theme. Instead of the default generated ...
1
vote
0answers
60 views

How to create private links to unmanaged files ?

I have created my own module with custom block to display private downloads to authenticated users. The downloads files are provided by 3rd-party system and stored in private folder of Drupal ...
0
votes
1answer
28 views

Base URL for all external links

I have site that has multiple external links. I need a way to edit them all at once. For example: I have a site www.example.com that has multiple external links like SOME-IP/getaccess, SOME-IP/...
1
vote
0answers
19 views

How can I parse an URL from the Link module? [closed]

I am developing a website, my website, powering Drupal 7 and I know that the Link module already has something like displaying a link from http://website.com/some-article-here to website.com but I ...
0
votes
1answer
75 views

Drupal 8 register link?

I have a clean Drupal 8 install with bootstrap theme. I just want to add a simple link to the registration form in the user account menu and to it only be visible if you are not logged in. The login ...
0
votes
3answers
28 views

Turn text or link field in image

Users can enter links in separate fields that lead to their facebook, youtube pages. On output i would like to use images for those fields instead of showing ugly links. Is there a module to ...
1
vote
1answer
152 views

How do I create menu links programmatically?

I need to add some links to existing menu (or to new) programmatically in Drupal 8.