This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

[Solved] How to hide regions using a custom module?

I'm building a custom module to be used to modify the general layout for my site, specifically for a landing page and splitting the site into some major sub-sections that are themed slightly differently. To do this, I'd like to hide certain regions and blocks from these particular routes/pages.

I'm having trouble finding a way to access a list of regions and then unsetting them programmatically. I found some forum answers to similar questions that use something like this:

Login and registeration in drupal

What i need to ask if it is possible to login into drupal with users from another system ,but the point is that i do not need to register these users as drupal users , is it possible or i should register the accounts into drupal ?

Language switcher is-active not set after setting a session variable

Hi, the issue I'm having is the the is-active class isn't set on the <li> for the active language in the language switcher. This only seems to happen after I write a value into the session:

\Drupal::request()->getSession()->set(self::SESSION_KEY_DIN, $userDin);

This seems to happen with any session key, not just the one in this example.

Multivalue field on same line in FieldFormatter module

Hi, I'm working on moving from D7 to D10 a module that adds a specific display for entity reference fields (i.e. to print first + last name rather than login for users, and other things related to our contents).

This part works fine (with a class that extends FormatterBase) but with multivalued fields each value is on a separated line. I tried in the viewElements() to cleanup any classes, or to insert style, or inline classes, but it seems that the DIV prevents the inline to work (DIV field-labels + field-label each).

How to reset counter in Drupal form using AJAX

Hello,

I am new to module development.

I like incrementing the counter using AJAX in the Drupal form, which works. I like to add a reset button to reset the counter, but I am not sure how.

Adding Paypal buttons and link

Running Drupal Version 8.9.18. Have set up subscription service in Paypal and want to link buttons to website. Have pasted the Paypal code into a content box and tried again with pasting into the link box but I just get a lot of code and not a button. 
I'm not a programmer so please be very basic in any replies. Also I need to link Paypal to Drupal via an API number but I am not sure where to find it. Can anyone help. Thanks in advance. 

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions