Skip to main content

Questions tagged [8]

Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.

Filter by
Sorted by
Tagged with
-3 votes
1 answer
300 views

Find the current node title from my custom module

I'm working on a simple custom module (Drupal 8). How can I get the title of the current node and use it in module's template twig file (or pass it to twig file through PHP)?
graham89's user avatar
-3 votes
1 answer
193 views

How to display a date facet in a date popup/picker?

I have a date range field in my content type. Is there any way to display a date popup/picker facet on my search page. Any workaround? through facet api, javascript etc? Because I have searched all ...
Ahmad's user avatar
  • 2,835
-3 votes
2 answers
175 views

Popup message not coming

I am using the Popup After Login module to show a pop-up after the users log in. I want to display a Youtube video on the popup. The steps I followed after installing the module and enabling it are: ...
KUSHAL AGRAWAL's user avatar
-3 votes
1 answer
58 views

Where might I place code to programmatically update nodes?

I want to update or set value of specific node/entity with one button that have function to update specific field on that node / entity? And put in on view tab on that specific node on a button? How ...
Renaldi Yulvianda's user avatar
-3 votes
1 answer
324 views

Order comments text area in checkout [closed]

I need a order comments text area in checkout. How can I do this? I'm using Drupal Commerce 2.
Masaryk's user avatar
-3 votes
1 answer
210 views

How do I clear the cache for a custom block?

I have a custom block which is not updating when the data in the database is updated. It works when cache is cleared. Is there any solution for this cache issue? This is the code I am using. global $...
sani's user avatar
  • 1
-3 votes
1 answer
947 views

How to submit form selecting an option in a <select> defined in inline_template?

I have this custom form in which there is this: The corresponding code: $form['actions'] = array( '#type' => 'details', '#title' => 'Tâches associées', '#open' => TRUE, ); $...
gbmapo's user avatar
  • 1,086
-3 votes
1 answer
70 views

How to consume a web service using username?

I have set up a very simple web service in another server, using plain PHP, which receives data as GET, does a database search, and retrieves a JSON string. From the server where Drupal is installed, ...
Claudia's user avatar
  • 15
-3 votes
2 answers
1k views

How to know the menu ID

Like a function to debug a page or something. Want to add a link via links.yml but can't get the menu 'parent' name
Nicholas's user avatar
-3 votes
1 answer
293 views

How to escape square brackets in web forms?

consider the following HTML element in (View) Source page district: '#type':select '#title':District '#attributes': data-district: '[{Test!test!:Test!Test!}]' To my suprise ...
Zimakazi's user avatar
-3 votes
1 answer
85 views

Domain Access Source - Canonical

for now domain access and source set the correct canonical domain and show the links linked to the correct page. I can disable that and the links stay within the domain I’m currently on. Visitors won’...
Daniel's user avatar
  • 123
-3 votes
1 answer
627 views

Can I use Moment.js to fix a client side date format issue?

Different Browser and OS show a different date format on client side. Given the following markup: <input data-drupal-selector="edit-field-date-end-value-date" title="Date (e.g. 2019-05-15)" type="...
Mighty's user avatar
  • 221
-3 votes
1 answer
2k views

Use a Twig filter to resize / crop images in templates [closed]

I want to use a twig filter to resize/crop images in Drupal 8 templates for responsive images, I know I can generate responsive images with Image Style and Responsive Image styles, but that requires ...
felipep's user avatar
  • 332
-4 votes
1 answer
81 views

Is there a solution, allowing to fill a string field by decoding the bar code?

Do you know if is there a solution which would allow to input data to a string field decoding an image with bar code ? That is, there is a field, containing a button. Having pressed at the button, I ...
Yakimkin Roman's user avatar
-4 votes
1 answer
3k views

Do we really need Blog module in Drupal 7 (and 8)? [closed]

In Drupal 7, the Blog module do not have any option to change the URL. Because I want a different URL, I build blogs without the Blog module. For blog pages, I make it using Views and theme ...
apasajja's user avatar
  • 399
-4 votes
1 answer
2k views

What's the use of vendor folder? [closed]

Whats the use of vendor folder in drupal 8, what it actually do ?
Vikram8888's user avatar
-4 votes
1 answer
323 views

How do I integrate third-party payment gateways? [closed]

I need to integrate third-party payment gateways like Razorpay, Payu with Drupal 8 Webform. Is there any way to achieve this?
Vishak's user avatar
  • 1
-4 votes
1 answer
216 views

How to limit to certain page with TWIG?

I want this code to appear only when I visit one of the three paths below. How to do this in TWIG ? /product/add/produit or /product/*/edit or /product/*/duplicate The condition below does not work....
fire's user avatar
  • 87
-4 votes
1 answer
563 views

Alter the login form [closed]

I am new to Drupal and I need to alter the login form add extra validation fields with adding two more date of birth and email id using hook_form_alter. How do i do this. and how to find the login ...
Dileep G's user avatar
-4 votes
1 answer
44 views

Issues while Updating drupa/slack to 8.x-1.2

The site I am working on is using drupal/slack ^1.2 in composer.json file but the module present in the instance and that in composer.lock is the dev version. I ran a lando composer require drupal/...
Binny's user avatar
  • 930
-4 votes
1 answer
179 views

How to have all options of some menu on the same line?

In the mayo theme I use for my site, I have a footer menu. By default, the options of this menu are displayed vertically: I'd like to have the options displayed horizontally. How can I do that?
gbmapo's user avatar
  • 1,086
-4 votes
1 answer
135 views

If admin theme is 'seven' disable the module

So in a custom module, I'd like to check whether the theme is seven or not, if it's seven the module shouldn't load/work. Note: I have a module that shouldn't override half of UI of seven theme but ...
Sohail's user avatar
  • 1,544
-4 votes
1 answer
749 views

How to load a CSS file on a specific page, not on the entire site

I have a CSS library that I need to load on a particular page because loading on unnecessary pages reduces the performance of my site. I know to load it for all pages like. global-styling: css: theme: ...
Shakil Ahmad's user avatar
-4 votes
2 answers
89 views

Why is theme not used in my remote site when it is in my local site?

I just installed Drupal 8.9.13 locally with Composer: composer create-project drupal/recommended-project:8.9.13 mySite. Then I copied all files to remote site. Then I launched Drupal installer: http://...
gbmapo's user avatar
  • 1,086
-4 votes
1 answer
327 views

Error Unable to copy files settings files from BLT into your repository

When I try to run blt sync I am getting the following error. blt:init:settings Hash salt already exists. [error] Unable to copy files settings files from BLT into your repository. For ...
Rakesh James's user avatar
-4 votes
1 answer
43 views

How can you separately get the name and the value of a field?

I want to get the key and the value of my row for example I have this: {{ content.field_nom }} but the out put is: my field name my value My question is how do you get 'my field name' alone ...
love coding's user avatar
-4 votes
1 answer
119 views

How do you build a conditional form?

How do I build a form with : optgroup select for subject conditional display of informations depending on the selected subject conditional display of a part of the form if a checkbox is ticked ...
LFPBFS's user avatar
  • 3
-4 votes
1 answer
114 views

Block with Listing of custom links to redirect to pages

With Drupal 8 I want to have a block with a select list that I get programmatically from taxonomy terms and when the user clicks on Submit it redirects the user to the page I put in the list. What is ...
Diana's user avatar
  • 3,002
-5 votes
3 answers
15k views

How do I add CSS files?

Here is an example of my *.info file. Why the page cannot load the CSS that I add myself?
wuchuan's user avatar
  • 75
-5 votes
3 answers
1k views

Two sites on the same server don't work

I have a Drupal 8 site installed in a root directory(/var/www/html). I then installed another Drupal 8 site in another folder(/var/www/html/myFolder). The homepage is working fine. If I try to log ...
Sarath Kumar's user avatar
-5 votes
1 answer
1k views

Different front page for logged in users [closed]

I want to show different front pages for different roles: Anonymous users should see www.domain.com\front, logged-in users should see www.domain.com\dashboard. There are two options I found so far: ...
Joost's user avatar
  • 1,378
-5 votes
1 answer
99 views

Automatically redirect user depending on its device screen size?

In a custom module (amap), I have two forms with the same final purpose: handle (create, update, delete) a custom content entity (distribution_inscription). The first one (...
gbmapo's user avatar
  • 1,086
-5 votes
1 answer
903 views

How to refresh a view automatically?

I have a Drupal 8 site with NodeJS. I use the following module: https://www.drupal.org/project/private_message_nodejs For the installation, I followed the instructions in the documentation of the ...
user avatar
-5 votes
1 answer
628 views

Removing a patch from Drupal core

I'm using cweagans/composer-patches to apply a patch to drupal/core. When a second developer has pulled down the codebase and run composer install, the installation of drupal/core is failing. Firstly, ...
QuietSpecialist's user avatar
-5 votes
2 answers
3k views

How to create a custom login form [duplicate]

I need to know please any suggestion about how to create a custom login form for another type of users in drupal 8 , I have now /user/login is for administrator, but I need to add /account/login it's ...
Amine EL HADI's user avatar
-7 votes
1 answer
4k views

I want to send emails from a custom module [closed]

I created a module to send emails, but I don't now how to send emails.
john 's user avatar

1
312 313 314 315
316