diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl index e386ab95..3a1210a1 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl @@ -5,17 +5,25 @@ <#import "lib-sequence.ftl" as s> <#import "lib-datetime.ftl" as dt> -<#assign linkedIndividual> - <#if statement.infoResource??> - ${statement.infoResourceName} - <#else> - <#-- This shouldn't happen, but we must provide for it --> - ${statement.authorshipName} (no linked information resource) +<@showAuthorship statement /> + +<#-- Use a macro to keep variable assignments local; otherwise the values get passed to the next + statement --> +<#macro showAuthorship statement> + + <#local linkedIndividual> + <#if statement.infoResource??> + ${statement.infoResourceName} + <#else> + <#-- This shouldn't happen, but we must provide for it --> + ${statement.authorshipName} (no linked information resource) + + + + <#if statement.dateTime??> + <#local year = dt.xsdDateTimeToYear(statement.dateTime)> - + + <@s.join [ linkedIndividual, year! ] /> -<#if statement.dateTime??> - <#assign year = dt.xsdDateTimeToYear(statement.dateTime)> - - -<@s.join [ linkedIndividual, year! ] /> \ No newline at end of file + \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl index 3e123cbd..cc4ba4cb 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl @@ -5,23 +5,31 @@ <#import "lib-sequence.ftl" as s> <#import "lib-datetime.ftl" as dt> -<#assign degree> - <#if statement.degreeName??> - <@s.join [ statement.degreeAbbr!statement.degreeName, statement.majorField! ], " in " /> +<@showEducationalTraining statement /> + +<#-- Use a macro to keep variable assignments local; otherwise the values get passed to the next + statement --> +<#macro showEducationalTraining statement> + + <#local degree> + <#if statement.degreeName??> + <@s.join [ statement.degreeAbbr!statement.degreeName, statement.majorField! ], " in " /> + + + + <#local linkedIndividual> + <#if statement.org??> + ${statement.orgName} + <#else> + <#-- This shouldn't happen, but we must provide for it --> + ${statement.edTrainingName} (no linked organization) + + + + <#if statement.dateTime??> + <#local year = dt.xsdDateTimeToYear(statement.dateTime)> - + + <@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info!, year! ] /> -<#assign linkedIndividual> - <#if statement.org??> - ${statement.orgName} - <#else> - <#-- This shouldn't happen, but we must provide for it --> - ${statement.edTrainingName} (no linked organization) - - - -<#if statement.dateTime??> - <#assign year = dt.xsdDateTimeToYear(statement.dateTime)> - - -<@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info!, year! ] /> + \ No newline at end of file