You can use https://www.drupal.org/project/config_track β in Drupal 9/10
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 %}
hansrossel β made their first commit to this issueβs fork.
hansrossel β created an issue.
hansrossel β created an issue.
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);
});
}
};
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');"
hansrossel β created an issue.