{"id":57731,"date":"2023-08-24T17:28:28","date_gmt":"2023-08-24T11:58:28","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=57731"},"modified":"2023-09-04T18:05:07","modified_gmt":"2023-09-04T12:35:07","slug":"create-a-dynamic-route-in-drupal-8-9","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/","title":{"rendered":"Create A Dynamic Route in Drupal 8 &amp; 9"},"content":{"rendered":"<p style=\"text-align: left;\">As we know providing routes in the routing.yml file is the simplest way to achieve the static routes. Creating dynamic routes is a bit different from the way we achieve static routes.<\/p>\n<p style=\"text-align: left;\">So In Drupal 8 or 9, we can achieve this by following below few steps below.<\/p>\n<h2 style=\"text-align: left;\"><strong>Step 1. Create an entry in custom.routing.yml<\/strong><\/h2>\n<p style=\"text-align: left;\">So we need to add an entry in the method &#8220;route_callbacks&#8221; in our routing file.<\/p>\n<blockquote>\n<pre>route_callbacks:\r\n- '\\Drupal\\custom\\Routing\\DynamicListingRoutes::routes'<\/pre>\n<\/blockquote>\n<div style=\"text-align: left;\">\n<h2><strong>Step2. Create a routing class<\/strong><\/h2>\n<p>Now we need to create a Routing class &#8220;DynamicListingRoutes&#8221;\u00a0 and add our logic.<\/p>\n<p>The dynamic routing method can return either an array of <strong>Route<\/strong> objects or a <strong>RouteCollection<\/strong> Object.<\/p>\n<p><strong>1.<\/strong> Symfony\\Component\\Routing\\Route object<\/p>\n<div><a href=\"\/blog\/wp-ttn-blog\/uploads\/2023\/07\/imgonline-com-ua-twotoone-kDMkpd0dNIl0t-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-57735\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/07\/imgonline-com-ua-twotoone-kDMkpd0dNIl0t-2.jpg\" alt=\"Blog image\" width=\"1223\" height=\"1441\" srcset=\"https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/07\/imgonline-com-ua-twotoone-kDMkpd0dNIl0t-2.jpg 1223w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/07\/imgonline-com-ua-twotoone-kDMkpd0dNIl0t-2-255x300.jpg 255w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/07\/imgonline-com-ua-twotoone-kDMkpd0dNIl0t-2-869x1024.jpg 869w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/07\/imgonline-com-ua-twotoone-kDMkpd0dNIl0t-2-768x905.jpg 768w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/07\/imgonline-com-ua-twotoone-kDMkpd0dNIl0t-2-624x735.jpg 624w\" sizes=\"auto, (max-width: 1223px) 100vw, 1223px\" \/><\/a><\/div>\n<p>&nbsp;<\/p>\n<p><strong>2.<\/strong> \\Symfony\\Component\\Routing\\RouteCollection object<\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2023\/08\/route-collection.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-58121\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/08\/route-collection.png\" alt=\"Blog image\" width=\"772\" height=\"1363\" srcset=\"https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/08\/route-collection.png 772w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/08\/route-collection-170x300.png 170w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/08\/route-collection-580x1024.png 580w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/08\/route-collection-768x1356.png 768w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/08\/route-collection-624x1102.png 624w\" sizes=\"auto, (max-width: 772px) 100vw, 772px\" \/><\/a><\/p>\n<\/div>\n<p>In the above routing class, I&#8217;ve tried to create multiple routes based on the location of the hospitals.<\/p>\n<h2 style=\"text-align: left;\"><strong>Step 3. Create a Controller class<\/strong><\/h2>\n<p style=\"text-align: left;\">So, the last and 3rd step is to write a controller in which we describe the functionality or our logic.<br \/>\n<a href=\"\/blog\/wp-ttn-blog\/uploads\/2023\/08\/Screenshot-from-2023-08-24-15-18-48.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-58122\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/08\/Screenshot-from-2023-08-24-15-18-48.png\" alt=\"Blog image\" width=\"772\" height=\"390\" srcset=\"https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-24-15-18-48.png 772w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-24-15-18-48-300x152.png 300w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-24-15-18-48-768x388.png 768w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-from-2023-08-24-15-18-48-624x315.png 624w\" sizes=\"auto, (max-width: 772px) 100vw, 772px\" \/><\/a><\/p>\n<p>So in this case we&#8217;ve rendered a hospital listing view based on the location which we&#8217;re getting from our dynamic routing.<\/p>\n<p><strong>Conclusion<\/strong><br \/>\nSo using this method, we can create dynamic routes and render data according to the dynamic values.<\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>As we know providing routes in the routing.yml file is the simplest way to achieve the static routes. Creating dynamic routes is a bit different from the way we achieve static routes. So In Drupal 8 or 9, we can achieve this by following below few steps below. Step 1. Create an entry in custom.routing.yml [&hellip;]<\/p>\n","protected":false},"author":1527,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":26,"footnotes":""},"categories":[3602],"tags":[5359,5358,5357],"class_list":["post-57731","post","type-post","status-publish","format-standard","hentry","category-drupal","tag-drupal-custom-routing","tag-drupal-routing","tag-dynamic-routing"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"As we know providing routes in the routing.yml file is the simplest way to achieve the static routes. Creating dynamic routes is a bit different from the way we achieve static routes. So In Drupal 8 or 9, we can achieve this by following below few steps below. Step 1. Create an entry in custom.routing.yml\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yogesh Pratap Singh\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-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=\"Create A Dynamic Route in Drupal 8 &amp; 9 | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"As we know providing routes in the routing.yml file is the simplest way to achieve the static routes. Creating dynamic routes is a bit different from the way we achieve static routes. So In Drupal 8 or 9, we can achieve this by following below few steps below. Step 1. Create an entry in custom.routing.yml\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/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=\"Create A Dynamic Route in Drupal 8 &amp; 9 | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"As we know providing routes in the routing.yml file is the simplest way to achieve the static routes. Creating dynamic routes is a bit different from the way we achieve static routes. So In Drupal 8 or 9, we can achieve this by following below few steps below. Step 1. Create an entry in custom.routing.yml\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/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\\\/create-a-dynamic-route-in-drupal-8-9\\\/#article\",\"name\":\"Create A Dynamic Route in Drupal 8 & 9 | TO THE NEW Blog\",\"headline\":\"Create A Dynamic Route in Drupal 8 &amp; 9\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/yogesh-singh\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2023\\\/07\\\/imgonline-com-ua-twotoone-kDMkpd0dNIl0t-2.jpg\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-a-dynamic-route-in-drupal-8-9\\\/#articleImage\"},\"datePublished\":\"2023-08-24T17:28:28+05:30\",\"dateModified\":\"2023-09-04T18:05:07+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-a-dynamic-route-in-drupal-8-9\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-a-dynamic-route-in-drupal-8-9\\\/#webpage\"},\"articleSection\":\"Drupal, drupal custom routing, drupal routing, dynamic routing\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-a-dynamic-route-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\\\/create-a-dynamic-route-in-drupal-8-9\\\/#listItem\",\"name\":\"Create A Dynamic Route in Drupal 8 &amp; 9\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-a-dynamic-route-in-drupal-8-9\\\/#listItem\",\"position\":3,\"name\":\"Create A Dynamic Route in Drupal 8 &amp; 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\\\/yogesh-singh\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/yogesh-singh\\\/\",\"name\":\"Yogesh Pratap Singh\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-a-dynamic-route-in-drupal-8-9\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/1de785f6-1802-4e6d-8e28-05ba461e7f97_3543-Yogesh-Pratap-Singh-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Yogesh Pratap Singh\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-a-dynamic-route-in-drupal-8-9\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-a-dynamic-route-in-drupal-8-9\\\/\",\"name\":\"Create A Dynamic Route in Drupal 8 & 9 | TO THE NEW Blog\",\"description\":\"As we know providing routes in the routing.yml file is the simplest way to achieve the static routes. Creating dynamic routes is a bit different from the way we achieve static routes. So In Drupal 8 or 9, we can achieve this by following below few steps below. Step 1. Create an entry in custom.routing.yml\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/create-a-dynamic-route-in-drupal-8-9\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/yogesh-singh\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/yogesh-singh\\\/#author\"},\"datePublished\":\"2023-08-24T17:28:28+05:30\",\"dateModified\":\"2023-09-04T18:05:07+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":"Create A Dynamic Route in Drupal 8 & 9 | TO THE NEW Blog","description":"As we know providing routes in the routing.yml file is the simplest way to achieve the static routes. Creating dynamic routes is a bit different from the way we achieve static routes. So In Drupal 8 or 9, we can achieve this by following below few steps below. Step 1. Create an entry in custom.routing.yml","canonical_url":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/#article","name":"Create A Dynamic Route in Drupal 8 & 9 | TO THE NEW Blog","headline":"Create A Dynamic Route in Drupal 8 &amp; 9","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/yogesh-singh\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2023\/07\/imgonline-com-ua-twotoone-kDMkpd0dNIl0t-2.jpg","@id":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/#articleImage"},"datePublished":"2023-08-24T17:28:28+05:30","dateModified":"2023-09-04T18:05:07+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/#webpage"},"articleSection":"Drupal, drupal custom routing, drupal routing, dynamic routing"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-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\/create-a-dynamic-route-in-drupal-8-9\/#listItem","name":"Create A Dynamic Route in Drupal 8 &amp; 9"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/#listItem","position":3,"name":"Create A Dynamic Route in Drupal 8 &amp; 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\/yogesh-singh\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/yogesh-singh\/","name":"Yogesh Pratap Singh","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/1de785f6-1802-4e6d-8e28-05ba461e7f97_3543-Yogesh-Pratap-Singh-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Yogesh Pratap Singh"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/","name":"Create A Dynamic Route in Drupal 8 & 9 | TO THE NEW Blog","description":"As we know providing routes in the routing.yml file is the simplest way to achieve the static routes. Creating dynamic routes is a bit different from the way we achieve static routes. So In Drupal 8 or 9, we can achieve this by following below few steps below. Step 1. Create an entry in custom.routing.yml","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/yogesh-singh\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/yogesh-singh\/#author"},"datePublished":"2023-08-24T17:28:28+05:30","dateModified":"2023-09-04T18:05:07+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"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Create A Dynamic Route in Drupal 8 &amp; 9 | TO THE NEW Blog","og:description":"As we know providing routes in the routing.yml file is the simplest way to achieve the static routes. Creating dynamic routes is a bit different from the way we achieve static routes. So In Drupal 8 or 9, we can achieve this by following below few steps below. Step 1. Create an entry in custom.routing.yml","og:url":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Create A Dynamic Route in Drupal 8 &amp; 9 | TO THE NEW Blog","twitter:description":"As we know providing routes in the routing.yml file is the simplest way to achieve the static routes. Creating dynamic routes is a bit different from the way we achieve static routes. So In Drupal 8 or 9, we can achieve this by following below few steps below. Step 1. Create an entry in custom.routing.yml","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"57731","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-65e06529521ee","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-07-12 10:11:27","updated":"2024-02-29 11:06: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:\/\/www.tothenew.com\/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:\/\/www.tothenew.com\/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\tCreate A Dynamic Route in Drupal 8 &amp; 9\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Drupal","link":"https:\/\/www.tothenew.com\/blog\/category\/drupal\/"},{"label":"Create A Dynamic Route in Drupal 8 &amp; 9","link":"https:\/\/www.tothenew.com\/blog\/create-a-dynamic-route-in-drupal-8-9\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/57731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1527"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=57731"}],"version-history":[{"count":5,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/57731\/revisions"}],"predecessor-version":[{"id":58297,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/57731\/revisions\/58297"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=57731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=57731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=57731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}