<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@page import="at.oebb.tools.*, at.oebb.wcm.nav.*, at.oebb.wcm.navigation.config.*, at.oebb.wcm.navigation.writer.*, at.oebb.wcm.navigation.*, at.oebb.wcm.portal.config.*, at.oebb.wcm.portal.PortalManager, at.oebb.wcm.portal.properties.*, at.oebb.wcm.portal.teaser.*, at.oebb.wcm.util.*, at.oebb.wcm.util.RepositoryIteratorPrinter, de.gauss.vip.api.lang.ObjectId, de.gauss.vip.api.lang.ObjectType, de.gauss.vip.api.object.SimpleLink, de.gauss.vip.portalmanager.ContentHandler, de.gauss.vip.portalmanager.VipObjectBean, de.gauss.vip.repository.RepositoryEntry, java.io.File, java.text.SimpleDateFormat, java.util.*, at.oebb2010.config.ResourceManager, at.oebb2010.util.RequestTools, at.oebb2010.config.Resource" %> <%@ page import="de.gauss.lang.*" %> <% vob.setRepositoryName("holding_www_prod_3_2"); boolean edit = "PROD".equalsIgnoreCase("EDIT"); vob.addDefaultAttribute("oebb_teaser_1"); vob.addDefaultAttribute("oebb_teaser_2"); vob.addDefaultAttribute("oebb_teaser_3"); vob.addDefaultAttribute("oebb_teaser_4"); vob.addDefaultAttribute("oebb_teaser_5"); vob.addDefaultAttribute("oebb_teaser_6"); vob.addDefaultAttribute("pathname"); vob.addDefaultAttribute("template"); vob.addDefaultAttribute("language"); vob.addDefaultAttribute("category"); vob.addDefaultAttribute("type"); vob.addDefaultAttribute("nav_new_window"); vob.addDefaultAttribute("nav_internal_link"); vob.addDefaultAttribute("nav_external_link"); vob.addDefaultAttribute("oebb_navigation_enabled"); vob.addDefaultAttribute("oebb_nav_reihung"); vob.addDefaultAttribute("oebb_navigation_text"); vob.addDefaultAttribute("oebb_tunnel"); vob.addDefaultAttribute("prev_show"); vob.addDefaultAttribute("prev_title"); vob.addDefaultAttribute("prev_text"); vob.addDefaultAttribute("prev_image"); String OID = "450"; String myUrl="/holding/de/Das_Unternehmen/Nachhaltigkeitsbericht/index.html"; if(request.getQueryString()!=null){ myUrl+="?"+request.getQueryString(); } String myPrintURL=myUrl; RepositoryEntry currentObject = vob.getEntry(OID); RepositoryEntry configEntry = vob.getEntry("783"); String fullConfigPath = configEntry.get("pathname").toString(); fullConfigPath = "file:" + fullConfigPath.substring(0, fullConfigPath.lastIndexOf("/") + 1); String currentLang ="de"; if (currentObject.get("language")!=null){ currentLang=currentObject.get("language").toString(); if(currentLang.indexOf("_") > -1) { currentLang = currentLang.substring(0, currentLang.indexOf("_")); } } boolean tunnel=false; String parentUrl=""; if(currentObject.get("oebb_tunnel")!=null) { BooleanValue tunnelNav=(BooleanValue)currentObject.get("oebb_tunnel"); tunnel=tunnelNav.getBool(); if(tunnel){ RepositoryEntry parentObject=vob.getParentTopic(currentObject); parentUrl=vob.getUrl(parentObject); } } ResourceManager resourceManager = ResourceManager.getInstance(); if (RequestTools.getBool("clearChache", request)) { resourceManager.clearCache("HoldingSiteConfigBundle", fullConfigPath); } String printPageMedia="print"; boolean isPrintVersion=false; if (RequestTools.getBool("print", request)) { printPageMedia ="all"; isPrintVersion=true; } else{ if(request.getQueryString()!=null){ myPrintURL+="&print=true"; } else{ myPrintURL+="?print=true"; } } String[] printPageConfig = new String[]{printPageMedia,myPrintURL}; StringBuffer beforeTitle= new StringBuffer(); Resource pageProperties = resourceManager.getResource("HoldingSiteConfigBundle", currentLang, fullConfigPath); NavigationBean nav = new NavigationBean(vob); RepositoryEntry serviceBoxRoot = vob.getEntry(pageProperties.getString("page.serviceBoxRoot")); DefaultNavigationConfiguration serviceBoxNavConfig = new DefaultNavigationConfiguration(serviceBoxRoot, 3) { public String[] getTypes() { return new String[]{"TOPIC", "HTML", "JSP", "JSPTOPIC", "Weiterleitung"}; } public boolean isNavEnabled(RepositoryEntry entry) { BooleanValue val = (BooleanValue) entry.get(this.enabledAttribute); boolean myB = val != null && val.getBool(); return myB; } public boolean isRootTopic(RepositoryEntry entry) { Value val = entry.getValue(this.rootTopicAttribute); boolean myB = val != null && !val.isNull() && val.toString().equals(this.rootTopicValue); return myB; } public String getTitle(RepositoryEntry entry) { for (int i = 0; i < this.titleAttributes.length; i++) { Value title_val = entry.getValue(this.titleAttributes[i]); if (title_val != null && title_val.toString().trim().length() > 0) { return title_val.toString(); } } return "Navigationseintrag ohne Titel!"; } public Sort getSort() { return new KeySort(this.sortAttribute, this.sortDescending ? Sort.DESCENDING : Sort.ASCENDING); } }; serviceBoxNavConfig.setEnabledAttribute("oebb_navigation_enabled"); serviceBoxNavConfig.setTitleAttributes(new String[]{"oebb_navigation_text", "title"}); serviceBoxNavConfig.setSortAttribute("oebb_nav_reihung"); serviceBoxNavConfig.setSortDescending(false); DefaultNavigationConfiguration leftNavConfig = new DefaultNavigationConfiguration(null, 3) { public String[] getTypes() { return new String[]{"TOPIC", "HTML", "JSP", "JSPTOPIC","Karte", "Weiterleitung"}; } public boolean isNavEnabled(RepositoryEntry entry) { BooleanValue val = (BooleanValue) entry.get(this.enabledAttribute); boolean myB = val != null && val.getBool(); return myB; } public boolean isRootTopic(RepositoryEntry entry) { Value val = entry.getValue(this.rootTopicAttribute); boolean myB = val != null && !val.isNull() && val.toString().equals(this.rootTopicValue); return myB; } public String getTitle(RepositoryEntry entry) { for (int i = 0; i < this.titleAttributes.length; i++) { Value title_val = entry.getValue(this.titleAttributes[i]); if (title_val != null && title_val.toString().trim().length() > 0) { return title_val.toString(); } } return "Navigationseintrag ohne Titel!"; } public Sort getSort() { return new KeySort(this.sortAttribute, this.sortDescending ? Sort.DESCENDING : Sort.ASCENDING); } }; leftNavConfig.setEnabledAttribute("oebb_navigation_enabled"); leftNavConfig.setTitleAttributes(new String[]{"oebb_navigation_text", "title"}); leftNavConfig.setSortAttribute("oebb_nav_reihung"); leftNavConfig.setSortDescending(false); RepositoryEntry siteRoot = nav.findRootTopic(currentObject, leftNavConfig); leftNavConfig.setRootElement(siteRoot); boolean isRootTopic = leftNavConfig.isRootTopic(currentObject); %> <%=pageProperties.getString("page.title","ÖBB")%><%if(!isRootTopic)out.print(": "+currentObject.get("title"));%><%if(isPrintVersion)out.print(" "+pageProperties.getString("page.printVersionTitle"," "));%> <%for(int i=0;i <%for(int i=0;i