Posted on 05/11/2008 17:52:38
Sorensen wrote:
It's is still unclear to me why you can't wrap all employees in a single template? Does the module output hard coded HTML that makes it impossible or something?
Yea i can imagine, it's difficult to explain :-), but i'll try again:
It is regarding the Employee Tree functionality. In de List template there currently is an EMTree tag which renders the department and employee list.
Inside this EMTree for every department the "DepartmentTemplate.html" template is called and after every department a number of times the "EmployeeTemplate.html" template.
So if we look at how DW renders the employee list:
1. DW renders "ListTemplate.html"
2. DW renders "DepartmentTemplate.html"
3. DW renders "EmployeeTemplate.html"
4. DW renders "EmployeeTemplate.html"
5. DW renders "EmployeeTemplate.html"
6. DW renders "DepartmentTemplate.html"
7. DW renders "EmployeeTemplate.html"
etc.
That's why we are unable to insert a DIV element before it starts rendering the list of employees of a department, because there's no template available to edit that.
It would have been cool if the Employee list could be rendered with just a template loop.
Is it more clearer now? ;-)
Kind Regards,
Emil