Account created on 12 November 2005, over 18 years ago
  • Webdeveloper at KOBAΒ 
#

Merge Requests

Recent comments

πŸ‡§πŸ‡ͺBelgium hansrossel

In a custom module:

function MODULENAME_preprocess_superfish_menu_items(array &$variables) {

.... copy everything the first part of the function from superfish.theme.inc ....

$attributes = $item_attributes->__toString();
$menu_item_title = (string) $item['text'];
$menu_item_url = $item['url']->toString();
$link_element = '' . $menu_item_title . '';;
$link_element_menuparent = '' . $menu_item_title . '';;

$variables['menu_items'][] = [

.... copy the last part of the function from superfish.theme.inc ....
}

Copy superfish-menu-items.html.twig to your theme and add raw to the output of the menu links

{% if item.children is not empty %}
{{ item.link_menuparent|raw }}
{% else %}
{{ item.link|raw }}
{% endif %}

πŸ‡§πŸ‡ͺBelgium hansrossel

hansrossel β†’ made their first commit to this issue’s fork.

πŸ‡§πŸ‡ͺBelgium hansrossel

The html structure has changed a bit, so here is an updated version of the code.
You can also use it in a script.js file in your admin theme.

Drupal.behaviors.termReferenceTreeExpand = {
    attach: function(context, settings) {
      $('.field-widget-term-reference-tree .form-checkbox', context).once('term-ref-tree').change(function() {
        var isChecked = $(this).is(':checked');
        // Toggle the collapsed state of the term tree
        $(this).parent().parent().siblings('.term-reference-tree-button').toggleClass('term-reference-tree-collapsed');
        // Toggle the show/hide of the child term list
        $(this).parent().parent().siblings('.term-reference-tree-level').toggle(isChecked);
      });
    }
  };
πŸ‡§πŸ‡ͺBelgium hansrossel

If 
drush pm-uninstall MODULENAME
does not work due to an error, then you can also uninstall with:

drush eval "\$module_data = \Drupal::config('core.extension')->get('module'); unset(\$module_data['MODULENAME']); \Drupal::configFactory()->getEditable('core.extension')->set('module', \$module_data)->save();"

drush php-eval "\Drupal::keyValue('system.schema')->delete('MODULENAME');"

Production build 0.69.0 2024