The Complex Survey package in contrib has a UI that allows you to create a template specifically for a given section_id. (section-template-ae) This seems very useful.
After debugging I've got that page to work and it displays on the preview if I set @style@ appropriately.
However, its not working in the normal /www/respond page. Looking at the code, the following section of survey_section_add_to_form seems to be the section that should control the template. The code is finding the file and $section_template has the template contents in it. However section_template is never used anywhere else and the survey is displayed with the standard template not its specific template.
From survey_section_add_to_form:
# Is there a template for the section?
set template_filename "[template::get_resource_path]/forms/survey/sections/${section_id}.adp"
if {[file exists $template_filename]} {
set section_template [template::util::read_file $template_filename]
uplevel [list set section_template($section_info(name)) $section_template]
}
Can anyone shed some light on the intent of the code?
How do I tell acs-templating to use a specific template for a specific section when creating a form? I can't just set the @style@ as I did in section-template-ae because that would effect the whole form not just the specific section.
Thanks
Caroline