FreemarkerPresentationManager now falls back to PageTransformer if no theme manifest is found
or if XSL_FALLBACK.XSL is configured as template git-svn-id: https://svn.libreccm.org/ccm/trunk@5829 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
1cc7a9a80d
commit
7a814be765
|
|
@ -1,6 +1,7 @@
|
|||
package org.libreccm.theming;
|
||||
|
||||
import com.arsdigita.bebop.Bebop;
|
||||
import com.arsdigita.bebop.page.PageTransformer;
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
import com.arsdigita.globalization.GlobalizationHelper;
|
||||
import com.arsdigita.subsite.Site;
|
||||
|
|
@ -132,6 +133,11 @@ public class FreeMarkerPresentationManager implements PresentationManager {
|
|||
// }
|
||||
final InputStream manifestInputStream = servletContext
|
||||
.getResourceAsStream(themeManifestPath);
|
||||
if (manifestInputStream == null) {
|
||||
final PageTransformer pageTransformer = new PageTransformer();
|
||||
pageTransformer.servePage(document, request, response);
|
||||
return;
|
||||
}
|
||||
final ThemeManifestUtil manifestUtil = ThemeManifestUtil.getInstance();
|
||||
|
||||
final ThemeManifest manifest = manifestUtil
|
||||
|
|
@ -168,6 +174,12 @@ public class FreeMarkerPresentationManager implements PresentationManager {
|
|||
} else {
|
||||
applicationTemplatePath = templates.getDefaultApplicationTemplate();
|
||||
}
|
||||
|
||||
if ("XSL_FALLBACK.XSL".equals(applicationTemplatePath)) {
|
||||
final PageTransformer pageTransformer = new PageTransformer();
|
||||
pageTransformer.servePage(document, request, response);
|
||||
return;
|
||||
}
|
||||
|
||||
final Configuration configuration = new Configuration(
|
||||
Configuration.VERSION_2_3_28);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
"ui": "http://www.arsdigita.com/ui/1.0"}
|
||||
>
|
||||
|
||||
<#-- Move to Navigation tags? -->
|
||||
<#macro pageTitle>
|
||||
${model["//nav:categoryMenu/nav:category/@title"]}
|
||||
</#macro>
|
||||
|
|
|
|||
Loading…
Reference in New Issue