A DatoCMS plugin that displays dynamic prefixes on slug fields, resolved from static values and live GraphQL queries against your content.
{{BLOG_SLUG}}/ that resolve using your DatoCMS contentsiteSettingsModel.blogPage.slug) that are automatically converted to Content Delivery API queriesThe prefix is display-only and is not stored in the slug field value, keeping your slugs clean and compatible with DatoCMS validation.
Install the plugin from the DatoCMS Marketplace or search for "Slug Prefixer" in your project's plugin settings.
After installing, open the plugin settings and provide:
{ "BASE_URL": "https://example.com"}Assign the "Slug Prefixer" editor to any slug field, then configure:
{{KEY}} tokens that resolve to values from the global config or queries. Example: {{BLOG_SLUG}}/{ "BLOG_SLUG": "siteSettingsModel.blogPage.slug"}Each dot-notation path is converted to a GraphQL query against the Content Delivery API. Multiple paths are batched into a single request.
{{KEY}} tokens in the prefix pattern are replaced with matching valuesFor example, if your site settings model has a blog page with slug blog, and you configure:
{{BLOG_SLUG}}/{"BLOG_SLUG": "siteSettingsModel.blogPage.slug"}The editor will display: blog/ before the slug input.