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

adding entity reference fields to a custom content type programmatically

I am working on a redesign for a site that is implemented using Drupal 8. As part of this redesign, I need to add a taxonomy field to an existing (custom) content type. While I've found a lot of good information related to this problem, I'm afraid I haven't been able to solve it.

How to dynamically add menu items to main menu & create dropdown.

Hello friends,

I have added a menu item to my Drupal website via the following:

business_listing.links.menu.yml

business_listing.listings:
  title: 'Browse Members'
  description: 'Browse Business Listings'
  parent: main
  menu_name: main
  route_name: business_listing.view_all

This works fine.

I would now like to add sub items to this menu (make it s dropdown) programmatically. How would I go about doing this and where would I place the code.

I have tried the following:

Use form to display multiple view

Hello everybody,

I'd like to show views depending on form values. Do you have some ideas to do it ? I'm coding a custom module to do that.

Ckeditor - How to change Autogrow parameters in ckeditor.js with hook alter

Hi,

I need to add a min-height parameter for Autogrow functionnality in Ckeditor (Drupal 8.6.11). ( CKEDITOR.config.autoGrow_minHeight = 70; )

When I change it incore/modules/ckeditor/js/ckeditor.js, this is working, but of course, this is not the good way to proceed, because we should never modify that module file (around line 192) :

Error running phpunit tests

I'm using Drupal 8.6.12, PHP 7.2.8 and PHPUnit 7.5.6 and I get this error:

$ ./vendor/bin/phpunit -c docroot/core/phpunit.xml.dist

Fatal error: Declaration of Drupal\Tests\PhpunitCompatibilityTrait::createMock($originalClassName) must be compatible with PHPUnit\Framework\TestCase::createMock($originalClassName): PHPUnit\Framework\MockObject\MockObject in C:\dev\acquia\sites\devdesktop\my-drupal\docroot\core\tests\Drupal\Tests\UnitTestCase.php on line 19

3rd level menu is not displayed

I have set "Show as expanded" in the whole menus that I want to display the submenus, but doesn't displayed.

The structure of the menu is:

- A

-- AA

--- AA1

--- AA2

- B

And display only the 

- A

-- AA

- B

doesn't display the:

--- AA1

--- AA2

How can I fix it?

Pages

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