-
4 years, 11 months ago #23715
Hi all,
I can only achieve to call a template with explicit name, like Simplifier.Template.<foldername>.<template> where <foldername> and <template> stands for a real existing folder and template.
How can i use a variable for e.g. <foldername> -> Simplifier.Template[foldername].emailTemplatename (where only “emailTemplatename” exists as template)
Hope you can help me
Best regards
Klaus
Jennifer HäfnerModerator
Has successfully completed the online course Intermediate (200)
Has successfully completed the online course Advanced (300)
Has successfully completed the online course Basics (100)
Has successfully completed the online course Advanced (310)
Has successfully completed the online course Advanced (320)
Has successfully completed the Intermediate Certification
Has successfully completed the Advanced Certification4 years, 11 months ago #24092::Hi Klaus,
You can call a template dynamically (e.g. in a server side business object) like this:
var folder = input.folder;
var templateName = input.template;
var template = Simplifier.Template[folder][templateName]();
output.template = template;Note that the template has to exist in both folders.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.