{"id":58107,"date":"2023-08-29T12:44:03","date_gmt":"2023-08-29T07:14:03","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=58107"},"modified":"2023-08-29T16:22:11","modified_gmt":"2023-08-29T10:52:11","slug":"how-to-create-a-custom-token-in-drupal-8-9","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/","title":{"rendered":"How to create a custom token in Drupal 8\/9"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Tokens are an essential feature in Drupal that allows you to dynamically insert data into various parts of your website, such as content, email templates, etc. While Drupal provides a set of default tokens, you might find yourself in a situation where you must create custom tokens to display specific information or improve the user experience. In this blog post, I walk you through the process of creating custom tokens in Drupal.<\/p>\n<p><strong>Step 1<\/strong><\/p>\n<p>Create a Custom Module Custom tokens are usually created within custom modules. If you haven&#8217;t already, create a custom module for your project.<\/p>\n<p><strong>Step 2<\/strong><\/p>\n<p>Define the Token In your custom module&#8217;s folder, locate the <span style=\"font-size: x-large;\"><code class=\"western\">.module<\/code><\/span> file (example: <span style=\"font-size: x-large;\"><code class=\"western\">custom.module<\/code><\/span>) and open it in a text editor. Now, define your custom token using the <span style=\"font-size: x-large;\"><code class=\"western\">hook_token_info()<\/code><\/span> function. Add the following code:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-58105 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-19.png\" alt=\"Blog image\" width=\"1092\" height=\"380\" srcset=\"https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-19.png 1092w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-19-300x104.png 300w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-19-1024x356.png 1024w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-19-768x267.png 768w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-19-624x217.png 624w\" sizes=\"auto, (max-width: 1092px) 100vw, 1092px\" \/><\/p>\n<p><strong>Step 3<\/strong><\/p>\n<p>Implement the Token Value Next, you need to implement the token&#8217;s value by defining a function that generates the required data. Add the following code to your <span style=\"color: #374151;\"><span style=\"font-size: x-large;\"><code class=\"western\">.module<\/code><\/span><\/span> file:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-58106 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-34.png\" alt=\"Blog image\" width=\"1143\" height=\"556\" srcset=\"https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-34.png 1143w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-34-300x146.png 300w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-34-1024x498.png 1024w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-34-768x374.png 768w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-34-624x304.png 624w\" sizes=\"auto, (max-width: 1143px) 100vw, 1143px\" \/><\/p>\n<p><strong>Step 4<\/strong><\/p>\n<p>Clear the Cache After defining your custom token and implementing its value, you need to clear Drupal&#8217;s cache to make the new token available. Go to &#8220;Configuration&#8221; &gt; &#8220;Development&#8221; &gt; &#8220;Performance&#8221; and click the &#8220;Clear all caches&#8221; button.<\/p>\n<p><strong>Step 5<\/strong><\/p>\n<p>Using the Custom Token Your custom token is now ready for use. You can use it in various places, such as node content or email templates, by using the following syntax: <span style=\"color: #374151;\"><span style=\"font-size: x-large;\"><code class=\"western\">[custom:registration_date]<\/code><\/span><\/span><span style=\"color: #374151;\"><span style=\"font-family: S hne, ui-sans-serif, system-ui, apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;\"><span style=\"font-size: x-large;\">.<\/span><\/span><\/span><\/p>\n<h2>Conclusion<\/h2>\n<p>Creating custom tokens in Drupal allows you to enhance your website&#8217;s functionality and provide dynamic content to your users.<\/p>\n<p>&nbsp;<\/p>\n<p>Explore our\u00a0<a href=\"https:\/\/tothenewco.pro\/blog\/\">blogs<\/a>\u00a0for an in-depth understanding of various trending topics.<\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>Introduction Tokens are an essential feature in Drupal that allows you to dynamically insert data into various parts of your website, such as content, email templates, etc. While Drupal provides a set of default tokens, you might find yourself in a situation where you must create custom tokens to display specific information or improve the [&hellip;]<\/p>\n","protected":false},"author":1510,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":46,"footnotes":""},"categories":[3602],"tags":[4862],"class_list":["post-58107","post","type-post","status-publish","format-standard","hentry","category-drupal","tag-drupal"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Introduction Tokens are an essential feature in Drupal that allows you to dynamically insert data into various parts of your website, such as content, email templates, etc. While Drupal provides a set of default tokens, you might find yourself in a situation where you must create custom tokens to display specific information or improve the\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Asheesh Kumar Pal\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"How to create a custom token in Drupal 8\/9 | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Introduction Tokens are an essential feature in Drupal that allows you to dynamically insert data into various parts of your website, such as content, email templates, etc. While Drupal provides a set of default tokens, you might find yourself in a situation where you must create custom tokens to display specific information or improve the\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to create a custom token in Drupal 8\/9 | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Introduction Tokens are an essential feature in Drupal that allows you to dynamically insert data into various parts of your website, such as content, email templates, etc. While Drupal provides a set of default tokens, you might find yourself in a situation where you must create custom tokens to display specific information or improve the\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-a-custom-token-in-drupal-8-9\\\/#article\",\"name\":\"How to create a custom token in Drupal 8\\\/9 | TO THE NEW Blog\",\"headline\":\"How to create a custom token in Drupal 8\\\/9\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/asheesh-pal\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2023\\\/08\\\/Screenshot-from-2023-08-23-10-06-19.png\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-a-custom-token-in-drupal-8-9\\\/#articleImage\"},\"datePublished\":\"2023-08-29T12:44:03+05:30\",\"dateModified\":\"2023-08-29T16:22:11+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-a-custom-token-in-drupal-8-9\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-a-custom-token-in-drupal-8-9\\\/#webpage\"},\"articleSection\":\"Drupal, Drupal\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-a-custom-token-in-drupal-8-9\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/#listItem\",\"name\":\"Drupal\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/#listItem\",\"position\":2,\"name\":\"Drupal\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-a-custom-token-in-drupal-8-9\\\/#listItem\",\"name\":\"How to create a custom token in Drupal 8\\\/9\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-a-custom-token-in-drupal-8-9\\\/#listItem\",\"position\":3,\"name\":\"How to create a custom token in Drupal 8\\\/9\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/#listItem\",\"name\":\"Drupal\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/asheesh-pal\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/asheesh-pal\\\/\",\"name\":\"Asheesh Kumar Pal\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-a-custom-token-in-drupal-8-9\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/074b2d73-8ff7-4be3-93cc-1905538dcb77_Asheesh-Kumar-Pal-Profile-Pitcure.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Asheesh Kumar Pal\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-a-custom-token-in-drupal-8-9\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-a-custom-token-in-drupal-8-9\\\/\",\"name\":\"How to create a custom token in Drupal 8\\\/9 | TO THE NEW Blog\",\"description\":\"Introduction Tokens are an essential feature in Drupal that allows you to dynamically insert data into various parts of your website, such as content, email templates, etc. While Drupal provides a set of default tokens, you might find yourself in a situation where you must create custom tokens to display specific information or improve the\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-a-custom-token-in-drupal-8-9\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/asheesh-pal\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/asheesh-pal\\\/#author\"},\"datePublished\":\"2023-08-29T12:44:03+05:30\",\"dateModified\":\"2023-08-29T16:22:11+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to create a custom token in Drupal 8\/9 | TO THE NEW Blog","description":"Introduction Tokens are an essential feature in Drupal that allows you to dynamically insert data into various parts of your website, such as content, email templates, etc. While Drupal provides a set of default tokens, you might find yourself in a situation where you must create custom tokens to display specific information or improve the","canonical_url":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/#article","name":"How to create a custom token in Drupal 8\/9 | TO THE NEW Blog","headline":"How to create a custom token in Drupal 8\/9","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/asheesh-pal\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2023\/08\/Screenshot-from-2023-08-23-10-06-19.png","@id":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/#articleImage"},"datePublished":"2023-08-29T12:44:03+05:30","dateModified":"2023-08-29T16:22:11+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/#webpage"},"articleSection":"Drupal, Drupal"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/drupal\/#listItem","name":"Drupal"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/drupal\/#listItem","position":2,"name":"Drupal","item":"https:\/\/tothenewco.pro\/blog\/category\/drupal\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/#listItem","name":"How to create a custom token in Drupal 8\/9"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/#listItem","position":3,"name":"How to create a custom token in Drupal 8\/9","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/drupal\/#listItem","name":"Drupal"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/asheesh-pal\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/asheesh-pal\/","name":"Asheesh Kumar Pal","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/074b2d73-8ff7-4be3-93cc-1905538dcb77_Asheesh-Kumar-Pal-Profile-Pitcure.jpeg","width":96,"height":96,"caption":"Asheesh Kumar Pal"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/","name":"How to create a custom token in Drupal 8\/9 | TO THE NEW Blog","description":"Introduction Tokens are an essential feature in Drupal that allows you to dynamically insert data into various parts of your website, such as content, email templates, etc. While Drupal provides a set of default tokens, you might find yourself in a situation where you must create custom tokens to display specific information or improve the","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/asheesh-pal\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/asheesh-pal\/#author"},"datePublished":"2023-08-29T12:44:03+05:30","dateModified":"2023-08-29T16:22:11+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"How to create a custom token in Drupal 8\/9 | TO THE NEW Blog","og:description":"Introduction Tokens are an essential feature in Drupal that allows you to dynamically insert data into various parts of your website, such as content, email templates, etc. While Drupal provides a set of default tokens, you might find yourself in a situation where you must create custom tokens to display specific information or improve the","og:url":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"How to create a custom token in Drupal 8\/9 | TO THE NEW Blog","twitter:description":"Introduction Tokens are an essential feature in Drupal that allows you to dynamically insert data into various parts of your website, such as content, email templates, etc. While Drupal provides a set of default tokens, you might find yourself in a situation where you must create custom tokens to display specific information or improve the","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"58107","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"#aioseo-article-65e065657b39e","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"created":"2023-08-29 07:07:03","updated":"2024-02-29 11:07:17","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\/category\/drupal\/\" title=\"Drupal\">Drupal<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to create a custom token in Drupal 8\/9\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Drupal","link":"https:\/\/tothenewco.pro\/blog\/category\/drupal\/"},{"label":"How to create a custom token in Drupal 8\/9","link":"https:\/\/tothenewco.pro\/blog\/how-to-create-a-custom-token-in-drupal-8-9\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/58107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/1510"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=58107"}],"version-history":[{"count":3,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/58107\/revisions"}],"predecessor-version":[{"id":58197,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/58107\/revisions\/58197"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=58107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=58107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=58107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}