Create a related content block which sorts the nodes of related content by how many tags they share?

Create a related content block which sorts the nodes of related content by how many tags they share?

The options in a views Advanced tab seem to only allow: Multiple-value handling Filter to items that share all terms Filter to items that share any term and I’d like to show items that share any term but sort by showing the items sharing the most terms at the... read more
Contextual filter by month and year

Contextual filter by month and year

We have a site finally patched all the way up to 8.5.3. Our old site (8.4.0) was using a Views patch (just for reference) that allowed for a content date field to be contextually filtered by month and year using a URL like https://example.com/events/042018, which... read more
Create a related content block which sorts the nodes of related content by how many tags they share?

How to put a comma in addressfield display?

I’m using the address module with Drupal 8.x. I want a comma in the each line of the below address. Currently addresses display like: John Peter 1181 Broadway New York SW1A 1AA United Kingdom I want it to display like: John Peter, 1181 Broadway, New York, SW1A... read more
Create a related content block which sorts the nodes of related content by how many tags they share?

Invalidate Internal Page Cache on cookie change

There’s the cookies and cookies:MY_COOKIE_NAME cache context from core. Now I need to invalidate the Internal Page Cache for anonymous users when the value of a specific cookie changes. How can I implement this? I tried to add:... read more
Create a related content block which sorts the nodes of related content by how many tags they share?

Passing variables from hook_mail to cutom twig template

Custom twig template into hook_mail() $body_content = array( ‘#theme’ => ‘mail_body_content’, ‘#node’ => $node, ); I would like to access to node Entity and display value into the twig myfield_name: {{... read more
Create a related content block which sorts the nodes of related content by how many tags they share?

Pre-populate an Entity Reference when Adding a Node : Based on URL Alias

I am trying to pre-populate an entity reference with a specific game node, when a profile node is added; based on URL of the game the add button is on. The game node I want to reference in profile node is in the URL of the profile’s add page. By using views to... read more
Modify the images

Modify the images

I am currently working on Drupal 8 and Drupal commerce. I have created an image field called “field_image_category” in the product-variation-types called “default”. I have created a color field as an attribute called... read more
Create a related content block which sorts the nodes of related content by how many tags they share?

Add prefix / suffix to field by using template_preprocess_field

I remember in Drupal 7, this was possible. I need to add some HTML before a field and I don’t want to edit it in the Twig file. Is it somehow possible to add prefixes / suffixes by using the template_preprocess_field function? I already tried something like... read more
Create a related content block which sorts the nodes of related content by how many tags they share?

How do I get the UUID of a bundle?

The getBundleInfo method returns only the machine name and label for bundles. How do I get the UUID of each bundle, or of all bundles? read more
Create a related content block which sorts the nodes of related content by how many tags they share?

Add hidden field to checkbox and submit unchecked value

I want to submit a value if a checkbox is unchecked (on a node edit form). Using theme_form_element I can add the hidden field as follows: $variables[‘element’][‘#children’] = ‘$variables[‘element’][‘#name’] .... read more