Linked Questions

0 votes
0 answers
345 views

Dynamic meta tags and description in custom pages [duplicate]

I have a custom drupal module which will generates pages for players in my site. The players stat data is meant to be updated most of the time, so for ease of use, I have created a custom module for ...
SANGEETH KUMAR S G's user avatar
7 votes
3 answers
3k views

How can I add an unescaped script tag and contents to a page?

I would like to add to my pages the structured data in JSON-LD (https://developers.google.com/search/docs/guides/intro-structured-data) Basically, what I need to do is to add somewhere in the HTML ...
user3535189's user avatar
4 votes
1 answer
851 views

How can I disable meta tags provided by the Metatag module for a custom route?

I have created a custom module for displaying the players information. Module will create dynamic pages and each page will display players stats. With the help of the following links, I was able to ...
SANGEETH KUMAR S G's user avatar
1 vote
3 answers
840 views

Injecting metadata into all nodes within one folder

For my school I need to add metadata into the tag of every node/page within the folder /course/ The metadata is the same for every page in this folder: <meta class="swiftype" name="tags" data-...
Dave Thackeray's user avatar
0 votes
1 answer
1k views

Create custom meta tag with the metatag module

Just this. I need to create some metatag using the metatag module: https://www.drupal.org/project/metatag Something like: <meta property="og:locale" content="en_US" /> <meta property="og:...
chefnelone's user avatar
  • 6,227
0 votes
2 answers
2k views

Generate meta in controller

I'm creating a custom module. This module displays public custom content without node and views . For this content custom page , I would like to add dynamic meta keyword and meta description . I ...
Agriesean's user avatar
0 votes
2 answers
2k views

From Controller to html.twig

I have a module that define a Routing and a controller my.partner: path: '/partner/{alias}' defaults: _controller: '\Drupal\myname\Controller\PagesController::partner' _title: 'Partner' ...
ZioBudda's user avatar
  • 1,182
2 votes
2 answers
1k views

Load all/multiple fields from entity of certain type

I'm quite new to Drupal so bear with me here. I've created an entity using Drupal Console, specifically using drupal generate:entity:content. Which works perfectly. Kudos to the Drupal console guys. ...
Andrew's user avatar
  • 711
0 votes
2 answers
811 views

How can I add CSS variables to the HTML head?

For my site I want to be able to set custom css variables to the sites head. I don't want to add css files just inline css code. In the end I want users to be able to set colors using a color picker. ...
Joost's user avatar
  • 1,318
0 votes
1 answer
247 views

How to add custom attributes to description meta tag?

I need to add 'class' and 'data-type' attributes to meta tag containing description attribute. I was able to locate the core Metatag module, however I'm unable to find any documentation on how to ...
bdereta's user avatar
  • 141