<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Custom metadata on template - Best practice?]]></title><description><![CDATA[<p>Currently I'm storing some custom metadata in the template like this:</p>
<pre><code>{{!-- metadata{
  &quot;title&quot;: &quot;Xmas Card&quot;,
  &quot;uipath&quot;: &quot;aika/web/person&quot;,
  &quot;accept&quot;: &quot;person&quot;,
  &quot;mimetype&quot;: &quot;message/rfc822&quot;
 }--}}
From: kontakt@septima.dk
To: {{email}}
Subject: Merry Xmas


You and your family ...
</code></pre>
<p>This means I can expose a service to inform clients (system to system) which templates exist, what data they accept and return, and finally give them a user friendly title to display to the end user:</p>
<pre><code>[
    {
        &quot;title&quot;: &quot;Personoplysninger&quot;,
        &quot;mimetype&quot;: &quot;application/pdf&quot;,
        &quot;uipath&quot;: &quot;aika/web/person&quot;,
        &quot;accept&quot;: &quot;person&quot;,
        &quot;id&quot;: &quot;LmNeYrxmvHFE8HQD&quot;,
        &quot;template&quot;: &quot;personinfo&quot;
    },
    {
        &quot;title&quot;: &quot;Xmas Card&quot;,
        &quot;mimetype&quot;: &quot;message/rfc822&quot;,
        &quot;uipath&quot;: &quot;aika/web/person&quot;,
        &quot;accept&quot;: &quot;person&quot;,
        &quot;id&quot;: &quot;Y6rQ0wf5BYAWw6tT&quot;,
        &quot;template&quot;: &quot;xmasmail&quot;
    }
]
</code></pre>
<p>Is there a better way of doing this? I've had a look at the localization extension which seems the closest to what I need.<br />
Is that the way to go, should I continue what I'm doing, or have I missed something?</p>
<p>Thank you</p>
]]></description><link>https://forum.jsreport.net/topic/2728/custom-metadata-on-template-best-practice</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 14:15:54 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/2728.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 09 Mar 2023 10:30:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Custom metadata on template - Best practice? on Invalid Date]]></title><description><![CDATA[<p>Currently I'm storing some custom metadata in the template like this:</p>
<pre><code>{{!-- metadata{
  &quot;title&quot;: &quot;Xmas Card&quot;,
  &quot;uipath&quot;: &quot;aika/web/person&quot;,
  &quot;accept&quot;: &quot;person&quot;,
  &quot;mimetype&quot;: &quot;message/rfc822&quot;
 }--}}
From: kontakt@septima.dk
To: {{email}}
Subject: Merry Xmas


You and your family ...
</code></pre>
<p>This means I can expose a service to inform clients (system to system) which templates exist, what data they accept and return, and finally give them a user friendly title to display to the end user:</p>
<pre><code>[
    {
        &quot;title&quot;: &quot;Personoplysninger&quot;,
        &quot;mimetype&quot;: &quot;application/pdf&quot;,
        &quot;uipath&quot;: &quot;aika/web/person&quot;,
        &quot;accept&quot;: &quot;person&quot;,
        &quot;id&quot;: &quot;LmNeYrxmvHFE8HQD&quot;,
        &quot;template&quot;: &quot;personinfo&quot;
    },
    {
        &quot;title&quot;: &quot;Xmas Card&quot;,
        &quot;mimetype&quot;: &quot;message/rfc822&quot;,
        &quot;uipath&quot;: &quot;aika/web/person&quot;,
        &quot;accept&quot;: &quot;person&quot;,
        &quot;id&quot;: &quot;Y6rQ0wf5BYAWw6tT&quot;,
        &quot;template&quot;: &quot;xmasmail&quot;
    }
]
</code></pre>
<p>Is there a better way of doing this? I've had a look at the localization extension which seems the closest to what I need.<br />
Is that the way to go, should I continue what I'm doing, or have I missed something?</p>
<p>Thank you</p>
]]></description><link>https://forum.jsreport.net/post/11814</link><guid isPermaLink="true">https://forum.jsreport.net/post/11814</guid><dc:creator><![CDATA[Klavs Pihlkjær Christensen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Custom metadata on template - Best practice? on Invalid Date]]></title><description><![CDATA[<p>What you do is likely the best. If you find it messy in the future, you can think about the following ideas...</p>
<p>Another option is to have a convention, that in the same folder as the template, you will have also an <a href="https://jsreport.net/learn/assets" rel="nofollow">asset</a> with the metadata.<br />
<code>sometemplate</code><br />
<code>sometemplate-metadata.json</code></p>
<p>And another option is to implement a custom extension that adds an extra field to the template and some modal to the studio so you can update it.<br />
<a href="https://jsreport.net/learn/custom-extension" rel="nofollow">https://jsreport.net/learn/custom-extension</a></p>
]]></description><link>https://forum.jsreport.net/post/11818</link><guid isPermaLink="true">https://forum.jsreport.net/post/11818</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Custom metadata on template - Best practice? on Invalid Date]]></title><description><![CDATA[<p>Thank you very much. I'll look into a custom extension. It'd be great to ensure that the properties I need are set</p>
<p>Will an extension be able to serve a reply to eg <a href="http://localhost:5488/" rel="nofollow">http://localhost:5488/</a><em>my-extension</em>/templates (such that I don't need to wrap jsreport in my <a href="https://forum.jsreport.net/topic/2726/attached-jsreport-responds-to-5488">own webapp</a>)</p>
<pre><code>[
    {
        &quot;title&quot;: &quot;Personoplysninger&quot;,
        &quot;mimetype&quot;: &quot;application/pdf&quot;,
        &quot;uipath&quot;: &quot;aika/web/person&quot;,
        &quot;accept&quot;: &quot;person&quot;,
        &quot;id&quot;: &quot;LmNeYrxmvHFE8HQD&quot;,
        &quot;template&quot;: &quot;personinfo&quot;
    },
    {
        &quot;title&quot;: &quot;Xmas Card&quot;,
        &quot;mimetype&quot;: &quot;message/rfc822&quot;,
        &quot;uipath&quot;: &quot;aika/web/person&quot;,
        &quot;accept&quot;: &quot;person&quot;,
        &quot;id&quot;: &quot;Y6rQ0wf5BYAWw6tT&quot;,
        &quot;template&quot;: &quot;xmasmail&quot;
    }
]
</code></pre>
<p>Thank you</p>
]]></description><link>https://forum.jsreport.net/post/11822</link><guid isPermaLink="true">https://forum.jsreport.net/post/11822</guid><dc:creator><![CDATA[Klavs Pihlkjær Christensen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Custom metadata on template - Best practice? on Invalid Date]]></title><description><![CDATA[<p>An extension can do everything :)<br />
You will just need to do some studying of the existing extensions, because it is poorly docummented.</p>
]]></description><link>https://forum.jsreport.net/post/11823</link><guid isPermaLink="true">https://forum.jsreport.net/post/11823</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>