Fixing problem PageController where it didn't go to the specified template. NIHVIVO-632
This commit is contained in:
parent
1569743afc
commit
769637111d
1 changed files with 7 additions and 3 deletions
|
@ -70,9 +70,13 @@ public class PageController extends FreemarkerHttpServlet{
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getTemplate(Map<String, Object> mapForTemplate) {
|
private String getTemplate(Map<String, Object> mapForTemplate) {
|
||||||
if( mapForTemplate.containsKey("bodyTemplate"))
|
if( mapForTemplate.containsKey("page") ){
|
||||||
return (String) mapForTemplate.get("bodyTemplate");
|
Map page = (Map) mapForTemplate.get("page");
|
||||||
else
|
if( page != null && page.containsKey("bodyTemplate"))
|
||||||
|
return (String) page.get("bodyTemplate");
|
||||||
|
else
|
||||||
|
return DEFAULT_BODY_TEMPLATE;
|
||||||
|
}else
|
||||||
return DEFAULT_BODY_TEMPLATE;
|
return DEFAULT_BODY_TEMPLATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue