sympa
sympa copied to clipboard
Is it possible to set custom vars on xml creation list templates?
Version
Sympa 6.2.70
Installation method
deb package
Expected behavior
I'm trying to add custom_vars into xml template files to standarize automatic creation of certain lists, but I don't know if is even possible.
What I'm trying to achieve is something like this.
<?xml version="1.0" ?>
<list>
<listname>forpruebav2</listname>
<type>my_type</type>
<subject>XML generated list xxxxx</subject>
<status>open</status>
<topics>my_topic</topics>
<language>es</language>
<owner multiple="1">
<email>[email protected]</email>
</owner>
<custom_subject>TEST LIST</custom_subject>
<custom_vars>
<var name=“my_custom_var_name" value="/xxx/xxx/xxxx/my_file.txt"/>
</custom_vars>
</list>
The template work (list is created), but obviously custom_vars section is just "ignored"
XML element should be:
<custom_vars multiple="1">
<name>my_custom_var_name</name>
<value>/xxx/xxx/xxxx/my_file.txt</value>
</custom_vars>
And you may add the parameter to config.tt2
of list creation template:
(Existing content of config.tt2...)
[% FOREACH v = custom_vars %]
custom_vars
[% v.name %] [%v.value %]
[% END %]
Thank you I will test and let you know
regards
-- Gonzalo
El dom, 28 ene 2024 a las 2:33, IKEDA Soji @.***>) escribió:
XML element should be:
<custom_vars multiple="1"> <name>my_custom_var_name</name> <value>/xxx/xxx/xxxx/my_file.txt</value> </custom_vars>
And you may add the parameter to config.tt2 of list creation template:
(Existing content of config.tt2...)
[% FOREACH v = custom_vars %] custom_vars [% v.name %] [%v.value %]
[% END %]
— Reply to this email directly, view it on GitHub https://github.com/sympa-community/sympa/issues/1793#issuecomment-1913401935, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOAMMZSSSV7AWZTMOPQRTYQWTFNAVCNFSM6AAAAABCKIG572VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGQYDCOJTGU . You are receiving this because you authored the thread.Message ID: @.***>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Possibly solved. Close.