made section templates more flexible

This commit is contained in:
leopoldfajtak
2024-12-05 10:35:07 +01:00
parent 12dc7edf0e
commit 6938f650fd
13 changed files with 62 additions and 124 deletions
+10 -9
View File
@@ -10,15 +10,16 @@
[% USE song_choices = datafile("${config_dir}/song_choices.csv", delim= '|') %]
[% FOREACH song = song_choices %]
[% template = song.template == '' ? "song_template.tt" : song.template -%]
[% INCLUDE "$template"
purpose = song.purpose
content = song.content
variables = song.variables ? "${library_dir}/${song.variables}/assignments.tt" : ''
directory = song.variables ? "${library_dir}/${song.variables}" : ''
%]
[% END %]
[%
FOREACH song = song_choices;
template = song.template == '' ? "song_template.tt" : song.template;
INCLUDE "$template"
purpose = song.purpose
assignments = song.assignments_directory ? "${library_dir}/${song.assignments_directory}/assignments.tt" : ''
directory = song.assignments_directory ? "${library_dir}/${song.assignments_directory}" : ''
overrides = song.overrides;
END;
-%]
[% INCLUDE footer.tt %]