1"use strict";(globalThis.webpackChunkdocs=globalThis.webpackChunkdocs||[]).push([[9288],{92346(e,n,r){r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>a,frontMatter:()=>d,metadata:()=>t,toc:()=>o});const t=JSON.parse('{"id":"optional-services/file-transformers/docx-templates","title":"DOCX Transformer \u2014 Template Reference","description":"Reference of the template placeholder codes supported by the DOCX file transformer","source":"@site/docs/optional-services/file-transformers/docx-templates.md","sourceDirName":"optional-services/file-transformers","slug":"/optional-services/file-transformers/docx-templates","permalink":"/optional-services/file-transformers/docx-templates","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1,"sidebar_label":"DOCX Templates","description":"Reference of the template placeholder codes supported by the DOCX file transformer"},"sidebar":"documentationSidebar","previous":{"title":"File Transformers","permalink":"/optional-services/file-transformers/"},"next":{"title":"RDA maDMP JSON","permalink":"/optional-services/file-transformers/rda-json-semantics"}}');var s=r(74848),i=r(28453);const d={sidebar_position:1,sidebar_label:"DOCX Templates",description:"Reference of the template placeholder codes supported by the DOCX file transformer"},c="DOCX Transformer \u2014 Template Reference",l={},o=[{value:"Create your custom template",id:"create-your-custom-template",level:2},{value:"Placeholder codes",id:"placeholder-codes",level:2},{value:"Related",id:"related",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"docx-transformer--template-reference",children:"DOCX Transformer \u2014 Template Reference"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"https://hub.docker.com/r/opencdmp/file-transformer-docx",children:"DOCX file transformer"})," exports plans and descriptions to Word documents (and PDFs derived from the same DOCX). Unlike the JSON transformers, it does ",(0,s.jsx)(n.strong,{children:"not"})," use ",(0,s.jsx)(n.a,{href:"/administering/content-management/templates/semantics",children:"semantic tags"}),". Instead, it substitutes placeholder codes embedded in a DOCX template at export time."]}),"\n",(0,s.jsx)(n.p,{children:"This page lists every placeholder code the transformer recognises."}),"\n",(0,s.jsx)(n.h2,{id:"create-your-custom-template",children:"Create your custom template"}),"\n",(0,s.jsx)(n.p,{children:"Templates must be DOCX files; the same file is used for both DOCX and PDF export."}),"\n",(0,s.jsx)(n.p,{children:"To apply a custom template to:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"A specific plan"})," \u2014 upload a DOCX file in the ",(0,s.jsx)(n.a,{href:"/using/blueprints",children:"Blueprint"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"All plans"})," \u2014 upload a DOCX file in the plugin configuration on the ",(0,s.jsx)(n.a,{href:"/administering/tenant-management/tenant-configuration",children:"Tenant Configuration page"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"A specific description"})," \u2014 upload a DOCX file in the ",(0,s.jsx)(n.a,{href:"/using/templates",children:"Description Template"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"All descriptions"})," \u2014 upload a DOCX file in the plugin configuration on the ",(0,s.jsx)(n.a,{href:"/administering/tenant-management/tenant-configuration",children:"Tenant Configuration page"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"If a specific blueprint or description template has its own DOCX file, it overrides the template declared in the Tenant Configuration."})}),"\n",(0,s.jsx)(n.h2,{id:"placeholder-codes",children:"Placeholder codes"}),"\n",(0,s.jsx)(n.p,{children:"Include these codes as plain text in your template. The transformer replaces them with plan or description data during export. None of them is mandatory \u2014 any code not included is simply ignored."}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Code"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.ID}'"})}),(0,s.jsx)(n.td,{children:"Id of the plan."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.VERSION}'"})}),(0,s.jsx)(n.td,{children:"Version of the plan."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.TITLE}'"})}),(0,s.jsx)(n.td,{children:"Title of the plan."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.DESCRIPTION}'"})}),(0,s.jsx)(n.td,{children:"Description of the plan."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.LANGUAGE}'"})}),(0,s.jsx)(n.td,{children:"Language of the plan."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.ACCESS-TYPE}'"})}),(0,s.jsx)(n.td,{children:"Access Type of the plan."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN-REFERENCE.<REFERENCE-TYPE-CODE>'"})}),(0,s.jsxs)(n.td,{children:["Reference of the plan by ",(0,s.jsx)(n.a,{href:"/administering/system-configuration/reference-types",children:(0,s.jsx)(n.strong,{children:"reference type code"})}),". For example, to get the plan's reference with type grant, the correct code is ",(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN-REFERENCE.GRANTS}'"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.CONTACTS}'"})}),(0,s.jsx)(n.td,{children:"Contacts of the plan."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.USERS}'"})}),(0,s.jsx)(n.td,{children:"Users of the plan."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.USERS-WITH-ROLES}'"})}),(0,s.jsx)(n.td,{children:"Users of the plan with their roles."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.STATUS}'"})}),(0,s.jsx)(n.td,{children:"Status of the plan."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.CREATOR.NAME}'"})}),(0,s.jsx)(n.td,{children:"Creator of the plan."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.BLUEPRINT.NAME}'"})}),(0,s.jsx)(n.td,{children:"Name of the blueprint."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.DEPOSIT-IDENTIFIERS}'"})}),(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.a,{href:"/using/plans/deposit-a-plan",children:(0,s.jsx)(n.strong,{children:"DOI"})})," of the plan."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.FINALIZED-AT}'"})}),(0,s.jsx)(n.td,{children:"Date when the plan was finalized."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.CREATED-AT}'"})}),(0,s.jsx)(n.td,{children:"Date when the plan was created."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.FORM}'"})}),(0,s.jsx)(n.td,{children:"Plan's sections and their content."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION.ID}'"})}),(0,s.jsx)(n.td,{children:"Id of the description."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION.TITLE}'"})}),(0,s.jsx)(n.td,{children:"Title of the description."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION.DESCRIPTION}'"})}),(0,s.jsx)(n.td,{children:"Description of the description."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION.STATUS}'"})}),(0,s.jsx)(n.td,{children:"Status of the description."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION.SECTION}'"})}),(0,s.jsx)(n.td,{children:"Section of the plan in which the description was created."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION.TEMPLATE.NAME}'"})}),(0,s.jsx)(n.td,{children:"Name of the description template."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION-REFERENCE.<REFERENCE-TYPE-CODE>'"})}),(0,s.jsxs)(n.td,{children:["Reference of the description by ",(0,s.jsx)(n.a,{href:"/administering/system-configuration/reference-types",children:(0,s.jsx)(n.strong,{children:"reference type code"})}),". For example, to get the description's reference with type grant, the correct code is ",(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION-REFERENCE.GRANTS}'"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION.CREATED-AT}'"})}),(0,s.jsx)(n.td,{children:"Date when the description was created."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION.FORM}'"})}),(0,s.jsx)(n.td,{children:"Description's sections and their content."})]})]})]}),"\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Description codes (",(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION.<CODE>}'"}
1),") are only resolved when exporting a specific description \u2014 not when exporting a plan."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"'{OPENCDMP.PLAN.FORM}'"})," is only available when exporting a plan."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"'{OPENCDMP.DESCRIPTION.FORM}'"})," is only available when exporting a description."]}),"\n"]})}),"\n",(0,s.jsx)(n.h2,{id:"related",children:"Related"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/optional-services/file-transformers/",children:"File Transformers"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/deployment/configuration/backend/file-transformers",children:"File Transformer Configuration"})}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453(e,n,r){r.d(n,{R:()=>d,x:()=>c});var t=r(96540);const s={},i=t.createContext(s);function d(e){const n=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.