{"id":69,"date":"2026-03-03T10:07:38","date_gmt":"2026-03-03T10:07:38","guid":{"rendered":"https:\/\/docmiral.com\/blog\/?p=69"},"modified":"2026-03-12T10:16:08","modified_gmt":"2026-03-12T10:16:08","slug":"how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators","status":"publish","type":"post","link":"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/","title":{"rendered":"How to Add Variables to Your DocMiral Templates (Complete Guide for Creators)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Creating powerful templates in DocMiral is not just about design. The real magic happens when your template becomes <strong>dynamic<\/strong> \u2014 able to accept data, adapt to users, and generate documents automatically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To make this possible, DocMiral templates support <strong>three types of variables<\/strong>. Each serves a different purpose and gives you a different level of control.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this guide, you will learn when and how to use:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MiniApp Fields<\/li>\n\n\n\n<li>Type Defined Fields<\/li>\n\n\n\n<li>Generic Fields<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You do <strong>not<\/strong> need to understand backend data structures or schemas. Everything here focuses on what matters to template creators: writing templates effectively.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">The Big Picture<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Think of template variables as three levels of intelligence:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Variable Type<\/th><th>Best For<\/th><th>UI Support<\/th><th>Complexity<\/th><\/tr><\/thead><tbody><tr><td>MiniApp Fields<\/td><td>Structured sections<\/td><td>Dedicated UI<\/td><td>Advanced<\/td><\/tr><tr><td>Type Defined Fields<\/td><td>Single controlled inputs<\/td><td>Built-in field UI<\/td><td>Medium<\/td><\/tr><tr><td>Generic Fields<\/td><td>Flexible API data<\/td><td>No UI required<\/td><td>Simple<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Choose the one that matches how structured your data needs to be.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">1. MiniApp Fields (Structured Sections)<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">MiniApps are the most powerful type of variable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They connect your template to a <strong>dedicated editing interface<\/strong> designed for a specific document section.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead of manually defining many fields, you reference a ready-made data editor.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">When to Use MiniApps<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use MiniApps when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A section has multiple related fields<\/li>\n\n\n\n<li>Users need a guided UI<\/li>\n\n\n\n<li>Data may repeat (lists)<\/li>\n\n\n\n<li>The structure is reusable across templates<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Typical examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Resume personal details<\/li>\n\n\n\n<li>Work experiences<\/li>\n\n\n\n<li>Education history<\/li>\n\n\n\n<li>Invoice items<\/li>\n\n\n\n<li>Inspection reports<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Accessing MiniApp Data<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">MiniApp fields use the <code>mini()<\/code> directive.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Object Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ mini(name='resumes\/personal', key='name') }}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This pulls a single value from the Resume Personal MiniApp.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">John Doe<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">List Example<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">MiniApps can also return lists.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% for item in mini(<br>    name=\"resumes\/experiences\",<br>    items=&#91;\"title\", \"company\", \"date_start\", \"date_end\"]<br>) %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Inside the loop:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ item.title }}<br>{{ item.company }}<br>{{ item.date_start }}<br>{{ item.date_end }}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This automatically renders multiple experience entries added by the user.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Why MiniApps Are Powerful<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You get:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Structured editing UI<\/li>\n\n\n\n<li>Consistent data format<\/li>\n\n\n\n<li>Cleaner templates<\/li>\n\n\n\n<li>Reusable sections across templates<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Instead of designing inputs yourself, you reuse intelligent components.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">2. Type Defined Fields (Smart Inputs)<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes you only need <strong>one field<\/strong>, not a full MiniApp.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s where <strong>Type Defined Fields<\/strong> come in.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They allow you to declare a field and specify how it should behave.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Using the <code>text()<\/code> Directive<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ text(<br>    name='agreement_text',<br>    title='Agreement Text',<br>    type='smarteditor'<br>) }}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This creates:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A named variable<\/li>\n\n\n\n<li>A labeled input<\/li>\n\n\n\n<li>A specific editor type<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">When to Use Type Defined Fields<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use them for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Agreements<\/li>\n\n\n\n<li>Descriptions<\/li>\n\n\n\n<li>Notes<\/li>\n\n\n\n<li>Custom paragraphs<\/li>\n\n\n\n<li>Checkboxes<\/li>\n\n\n\n<li>Dates<\/li>\n\n\n\n<li>Dropdown selections<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Essentially, any <strong>single configurable input<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Benefits<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>No UI coding required<\/li>\n\n\n\n<li>Consistent input behavior<\/li>\n\n\n\n<li>Cleaner creator experience<\/li>\n\n\n\n<li>Controlled data format<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You define intent, DocMiral handles the interface.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">3. Generic Fields (Pure Template Variables)<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Generic fields are the simplest and most flexible option.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They use standard Jinja-style variables.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Perfect for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>API users<\/li>\n\n\n\n<li>Automation workflows<\/li>\n\n\n\n<li>Fully custom data sources<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Simple Variables<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ name }}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or nested:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ client.name }}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Lists<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>{% for item in items %}<br>    {{ item }}<br>{% endfor %}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Complex Example<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>{% set result = data.report_info.inspection_result|lower %}\n&lt;span class=\"\n{% if result == 'pass' %} bg-green-600\n{% elif result == 'hold' %} bg-yellow-500\n{% elif result == 'fail' %} bg-red-600\n{% else %} bg-gray-500\n{% endif %}\n\">\n{{ data.report_info.inspection_result }}\n&lt;\/span><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This allows full logic control inside templates.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">When to Use Generic Fields<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Choose generic fields when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Data comes from APIs<\/li>\n\n\n\n<li>You want maximum flexibility<\/li>\n\n\n\n<li>No built-in UI is required<\/li>\n\n\n\n<li>You already control the data structure<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">They are especially popular among developers integrating DocMiral programmatically.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Choosing the Right Variable Type<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">A simple rule:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Use MiniApps when structure matters.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Example: Resume experiences.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Use Type Defined Fields when input matters.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Example: Agreement text or comments.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Use Generic Fields when flexibility matters.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Example: API-generated inspection results.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Decision Guide<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Situation<\/th><th>Recommended Type<\/th><\/tr><\/thead><tbody><tr><td>Resume section<\/td><td>MiniApp<\/td><\/tr><tr><td>Long editable paragraph<\/td><td>Type Defined<\/td><\/tr><tr><td>API data rendering<\/td><td>Generic<\/td><\/tr><tr><td>Repeating structured entries<\/td><td>MiniApp<\/td><\/tr><tr><td>One configurable input<\/td><td>Type Defined<\/td><\/tr><tr><td>Dynamic logic-heavy layout<\/td><td>Generic<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Mixing Variable Types (Best Practice)<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">A professional template often combines all three.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example resume template:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Personal info \u2192 MiniApp<\/li>\n\n\n\n<li>Summary text \u2192 Type Defined field<\/li>\n\n\n\n<li>API metadata \u2192 Generic fields<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This layered approach gives both usability and flexibility.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Creator Tips<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">Keep templates readable<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Group related variables together.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prefer MiniApps for reusable sections<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">They reduce duplication across templates.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Use Generic fields for advanced logic<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">They give you full control when needed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Name fields clearly<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Good naming improves usability later.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Final Thoughts<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">DocMiral templates are designed to scale from simple documents to complex automated systems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By understanding these three variable types, you can build templates that are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Easier for users to fill<\/li>\n\n\n\n<li>More reusable<\/li>\n\n\n\n<li>API-friendly<\/li>\n\n\n\n<li>Future-proof<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Start simple, then progressively enhance your templates using MiniApps and typed fields as your document grows.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating powerful templates in DocMiral is not just about design. The real magic happens when your template becomes dynamic \u2014 able to accept data, adapt to users, and generate documents automatically. To make this possible, DocMiral templates support three types of variables. Each serves a different purpose and gives you a different level of control. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,9,5,10,12],"tags":[],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-features","category-guide","category-how-tos","category-template-code-studio","category-template-design"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Add Variables to Your DocMiral Templates (Complete Guide for Creators) - DocMiral - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add Variables to Your DocMiral Templates (Complete Guide for Creators) - DocMiral - Blog\" \/>\n<meta property=\"og:description\" content=\"Creating powerful templates in DocMiral is not just about design. The real magic happens when your template becomes dynamic \u2014 able to accept data, adapt to users, and generate documents automatically. To make this possible, DocMiral templates support three types of variables. Each serves a different purpose and gives you a different level of control. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/\" \/>\n<meta property=\"og:site_name\" content=\"DocMiral - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-03T10:07:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-12T10:16:08+00:00\" \/>\n<meta name=\"author\" content=\"docmiral\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DocMiralCo\" \/>\n<meta name=\"twitter:site\" content=\"@DocMiralCo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"docmiral\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/\"},\"author\":{\"name\":\"docmiral\",\"@id\":\"https:\/\/docmiral.com\/blog\/#\/schema\/person\/df5267616c5991e7a42d1acf5e406abe\"},\"headline\":\"How to Add Variables to Your DocMiral Templates (Complete Guide for Creators)\",\"datePublished\":\"2026-03-03T10:07:38+00:00\",\"dateModified\":\"2026-03-12T10:16:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/\"},\"wordCount\":684,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/docmiral.com\/blog\/#organization\"},\"articleSection\":[\"Features\",\"Guide\",\"How To\",\"Template - Code Studio\",\"Template Design\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/\",\"url\":\"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/\",\"name\":\"How to Add Variables to Your DocMiral Templates (Complete Guide for Creators) - DocMiral - Blog\",\"isPartOf\":{\"@id\":\"https:\/\/docmiral.com\/blog\/#website\"},\"datePublished\":\"2026-03-03T10:07:38+00:00\",\"dateModified\":\"2026-03-12T10:16:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/docmiral.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add Variables to Your DocMiral Templates (Complete Guide for Creators)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/docmiral.com\/blog\/#website\",\"url\":\"https:\/\/docmiral.com\/blog\/\",\"name\":\"DocMiral - Blog\",\"description\":\"Document Builder For Modern Era!\",\"publisher\":{\"@id\":\"https:\/\/docmiral.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/docmiral.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/docmiral.com\/blog\/#organization\",\"name\":\"DocMiral - Blog\",\"url\":\"https:\/\/docmiral.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/docmiral.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/docmiral.com\/blog\/wp-content\/uploads\/2025\/11\/large.png\",\"contentUrl\":\"https:\/\/docmiral.com\/blog\/wp-content\/uploads\/2025\/11\/large.png\",\"width\":561,\"height\":499,\"caption\":\"DocMiral - Blog\"},\"image\":{\"@id\":\"https:\/\/docmiral.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/DocMiralCo\",\"https:\/\/www.linkedin.com\/company\/docmiral\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/docmiral.com\/blog\/#\/schema\/person\/df5267616c5991e7a42d1acf5e406abe\",\"name\":\"docmiral\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/0282d863f2ea88fe6a4ee6f6618934e209eccc4a3ab88466fac7628875effd29?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0282d863f2ea88fe6a4ee6f6618934e209eccc4a3ab88466fac7628875effd29?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0282d863f2ea88fe6a4ee6f6618934e209eccc4a3ab88466fac7628875effd29?s=96&d=mm&r=g\",\"caption\":\"docmiral\"},\"sameAs\":[\"https:\/\/docmiral.com\/blog\"],\"url\":\"https:\/\/docmiral.com\/blog\/author\/docmiral\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Add Variables to Your DocMiral Templates (Complete Guide for Creators) - DocMiral - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/","og_locale":"en_GB","og_type":"article","og_title":"How to Add Variables to Your DocMiral Templates (Complete Guide for Creators) - DocMiral - Blog","og_description":"Creating powerful templates in DocMiral is not just about design. The real magic happens when your template becomes dynamic \u2014 able to accept data, adapt to users, and generate documents automatically. To make this possible, DocMiral templates support three types of variables. Each serves a different purpose and gives you a different level of control. [&hellip;]","og_url":"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/","og_site_name":"DocMiral - Blog","article_published_time":"2026-03-03T10:07:38+00:00","article_modified_time":"2026-03-12T10:16:08+00:00","author":"docmiral","twitter_card":"summary_large_image","twitter_creator":"@DocMiralCo","twitter_site":"@DocMiralCo","twitter_misc":{"Written by":"docmiral","Estimated reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/#article","isPartOf":{"@id":"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/"},"author":{"name":"docmiral","@id":"https:\/\/docmiral.com\/blog\/#\/schema\/person\/df5267616c5991e7a42d1acf5e406abe"},"headline":"How to Add Variables to Your DocMiral Templates (Complete Guide for Creators)","datePublished":"2026-03-03T10:07:38+00:00","dateModified":"2026-03-12T10:16:08+00:00","mainEntityOfPage":{"@id":"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/"},"wordCount":684,"commentCount":1,"publisher":{"@id":"https:\/\/docmiral.com\/blog\/#organization"},"articleSection":["Features","Guide","How To","Template - Code Studio","Template Design"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/","url":"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/","name":"How to Add Variables to Your DocMiral Templates (Complete Guide for Creators) - DocMiral - Blog","isPartOf":{"@id":"https:\/\/docmiral.com\/blog\/#website"},"datePublished":"2026-03-03T10:07:38+00:00","dateModified":"2026-03-12T10:16:08+00:00","breadcrumb":{"@id":"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/docmiral.com\/blog\/how-to-add-variables-to-your-docmiral-templates-complete-guide-for-creators\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/docmiral.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Add Variables to Your DocMiral Templates (Complete Guide for Creators)"}]},{"@type":"WebSite","@id":"https:\/\/docmiral.com\/blog\/#website","url":"https:\/\/docmiral.com\/blog\/","name":"DocMiral - Blog","description":"Document Builder For Modern Era!","publisher":{"@id":"https:\/\/docmiral.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/docmiral.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/docmiral.com\/blog\/#organization","name":"DocMiral - Blog","url":"https:\/\/docmiral.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/docmiral.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/docmiral.com\/blog\/wp-content\/uploads\/2025\/11\/large.png","contentUrl":"https:\/\/docmiral.com\/blog\/wp-content\/uploads\/2025\/11\/large.png","width":561,"height":499,"caption":"DocMiral - Blog"},"image":{"@id":"https:\/\/docmiral.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/DocMiralCo","https:\/\/www.linkedin.com\/company\/docmiral"]},{"@type":"Person","@id":"https:\/\/docmiral.com\/blog\/#\/schema\/person\/df5267616c5991e7a42d1acf5e406abe","name":"docmiral","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/0282d863f2ea88fe6a4ee6f6618934e209eccc4a3ab88466fac7628875effd29?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0282d863f2ea88fe6a4ee6f6618934e209eccc4a3ab88466fac7628875effd29?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0282d863f2ea88fe6a4ee6f6618934e209eccc4a3ab88466fac7628875effd29?s=96&d=mm&r=g","caption":"docmiral"},"sameAs":["https:\/\/docmiral.com\/blog"],"url":"https:\/\/docmiral.com\/blog\/author\/docmiral\/"}]}},"_links":{"self":[{"href":"https:\/\/docmiral.com\/blog\/wp-json\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docmiral.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docmiral.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docmiral.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docmiral.com\/blog\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":1,"href":"https:\/\/docmiral.com\/blog\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/docmiral.com\/blog\/wp-json\/wp\/v2\/posts\/69\/revisions\/70"}],"wp:attachment":[{"href":"https:\/\/docmiral.com\/blog\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docmiral.com\/blog\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docmiral.com\/blog\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}