Tokens in menu link and title

Tokens in menu link and title

menu_token module is working fine to achieve the purpose. Does the module token_filter has this functionality? I can use tokens in wysiwyg using token_filter but cannot make it working for menu title or url since there is no setting I could find. Since the comment in... read more
Tokens in menu link and title

How can I set form values with Ajax?

I want to set the value of a textfield based upon the selection of a field above. You can choose a template and the textfield would have it as a value. This is the select field used to select the template with the ajax call // Template Select field... read more
Tokens in menu link and title

Trying to list all articles where category field is empty

I have drupal 7 site and I’m trying to listing all articles (with title) and where category field is empty (taxonomy). I’m running this code in my page with ->isNull and without, but not any results. Can someone explain what I’m doing wrong in... read more
Tokens in menu link and title

How do I add the "onload" attribute to a script tag?

I need to add the onload event in jquery script tag as advagg does. I have done a bit of research, and I found that they are actually invoking hook_element_info_alter() and thereby add their hook_advagg_modify_js_pre_render() implementation into it. Then, they alter... read more
Tokens in menu link and title

How do I conditionally add a class to my page title within page-title.html.twig?

I have a boolean field within my Page content type called Hide Title. I need to conditionally add a class to h1’s to visually hide them if this field is checked. I have the following within page-title.html.twig {% set hide_title = content.field_hide_title.0 %}... read more
Tokens in menu link and title

Splitting exposed form filters amongst several blocks

I have a views search page in D8 where I’m I have exposed filters that are shown in blocks. I’m also using search facet blocks. What I want in the sidebar is the exposed filter text search field, followed by the facets, and then an exposed filter for... read more
Tokens in menu link and title

Is it possible to update/remove/install 1 package with composer without updating everything?

I have seen a few posts answering this and saying that “composer require package” or “composer update package” will do this; but absolutely everything i do with composer attempts to update everything listed in require section of composer.json.... read more
Tokens in menu link and title

Why is libraries-override not removing assets?

My attempt to remove CSS and JS assets is not working. I have placed the following declarations in my module’s *.info.yml file. But after clearing the cache, I still see the assets in the head of the document. Is there anything wrong with my syntax:... read more
Tokens in menu link and title

JavaScript not executed before PDF gets generated

Using Entity Print 8x-2.1, I’ve got everything working great (thanks to the developoers of that module) except it does not appear to support loading the javascript portion of attached libraries. CSS is loading and rendering as expected from my print_styling... read more
Tokens in menu link and title

Create configuration storage programmattically for list_string

On a paragraph type, I have a field I want to migrate to a new field of type “list_string”. To do that in the deployment and like our automatic deployment begin by an update of the database follow by importation of configurations, I want to create the new... read more
Tokens in menu link and title

How do you correctly filter on taxonomy terms to get all nodes matching term or parent term?

I have a vocabulary (channel) with two levels. An article node can be added to the first or second level (via field_channel). The hierarchy looks like: channel-1 subchannel-1.1 subchannel-1.2 subchannel-1.3 channel-2 (i.e. [node/1, node/2]) subchannel-2.1 (i.e.... read more
Tokens in menu link and title

How to call custom javascript function defined in js file from .module file

I have some custom menu defined for which in the page callback function I want to execute some javascript function defined in some js file which is included in .info file. The alert and console.log works as file is included on the page and loading successfully in... read more