<%@ page language="java" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ page import="java.util.*, com.github.mustachejava.*, java.io.*, org.apache.commons.lang3.StringEscapeUtils" %> <%@ page isELIgnored ="false" %> <%@include file="/lib/inc/cache/1-min.jsp" %> <% pageContext.setAttribute( "pageTitle", "A Guide to San Francisco | KQED Public Media for Northern CA" ); %> <%-- Use Embargo to restrict page to Staff users only. --%> <% if ( pageConfig.isStaffUser() ) { %> <% } /* isStaffUser */ %> <%-- --%> <%-- --%> <%-- --%> <%-- // Temporarily remove static support ad since it lives in adThreeone --%> <%-- --%> <%! /** wrapper class around a "name" for script arrays... */ static class Name{ String name; public Name(String name){ this.name = name; } }; %> <% StringBuffer contentHead = new StringBuffer(); // contentHead.append( (String)pageContext.getAttribute("headerTemplate") ); // contentHead.append( "\n" ); StringBuffer column1Head = new StringBuffer(); StringBuffer column1Primary = new StringBuffer(); column1Primary.append( (String)pageContext.getAttribute("mastheadTemplate") ); column1Primary.append( "\n" ); column1Primary.append( (String)pageContext.getAttribute("introTemplate") ); column1Primary.append( "\n" ); column1Primary.append( (String)pageContext.getAttribute("riverTemplate") ); column1Primary.append( "\n" ); column1Primary.append( (String)pageContext.getAttribute("socialTemplate") ); column1Primary.append( "\n" ); //column1Primary.append( (String)pageContext.getAttribute("featuredTemplate") ); //column1Primary.append( "\n" ); //column1Primary.append( (String)pageContext.getAttribute("subfeaturesTemplate") ); //column1Primary.append( "\n" ); StringBuffer column1Secondary = new StringBuffer(); //column1Secondary.append( (String)pageContext.getAttribute("funderTemplate") ); //column1Secondary.append( "\n" ); StringBuffer moveableContent = new StringBuffer(); moveableContent.append( (String)pageContext.getAttribute("moveableContentScriptsTemplate") ); moveableContent.append( "\n" ); moveableContent.append( (String)pageContext.getAttribute("mrecTemplate") ); moveableContent.append( "\n" ); moveableContent.append( (String)pageContext.getAttribute("threeoneadTemplate") ); moveableContent.append( "\n" ); StringBuffer column2 = new StringBuffer(); //column2.append( (String)pageContext.getAttribute("newspromoTemplate") ); //column2.append( "\n" ); column2.append( (String)pageContext.getAttribute("popularTemplate") ); column2.append( "\n" ); // this array is just for " )); javaFileNames.add( new Name( "" )); // here's where the various pieces get put together! Map scopes = new HashMap(); // page config type stuff scopes.put( "pageTitle", (String)pageContext.getAttribute("pageTitle") ); scopes.put( "pageDesc", "KQED provides Public Media for Northern California. KQED supplies local news, arts, food, cooking, science, and education information through public broadcasting, blogs, podcasts, video, audio, workshops, and events." ); scopes.put( "pageKeywords", "kqed, kqed.org, kqed tv, public tv, kqed auction, kqed schedule, kqed san francisco, pbs san francisco, public broadcasting, kqed, kqet, tv, pbs, npr, kqed digital, video, audio, blog, podcast, rss, maps, public media, san francisco, bay area, california, san jose, radio, news, arts, food, cooking, bay area bites, check please, gallery crawl, writers block, science, quest, education, support, pledge, ncpb, northern California public broadcasting, british comedy, videoi, tv schedules, restaurants, reviews, recipes, workshops, events, local, forum, california report" ); if ( pageConfig.isStaffUser() ) { //scopes.put( "staffUserTemplate", (String)pageContext.getAttribute("staffUserTemplate") ); } // templates scopes.put( "ajaxEscapeHeader", "" ); scopes.put( "openGraph", (String)pageContext.getAttribute("openGraphTemplate") ); scopes.put( "javascript_head", javaFileNames ); scopes.put( "contentHead", contentHead ); scopes.put( "column1Head", column1Head ); scopes.put( "column1ContentPrimary", column1Primary ); scopes.put( "column1ContentSecondary", column1Secondary ); scopes.put( "moveableContent", moveableContent ); scopes.put( "column2Content", column2 ); scopes.put( "metricsTemplate", (String)pageContext.getAttribute("metricsTemplate") ); Mustache mustache = new DefaultMustacheFactory().compile(new StringReader((String)pageContext.getAttribute("pageTemplate")), "twoColumn"); Writer writer = new StringWriter(); mustache.execute(writer, scopes); // TODO - WHAT DOES THIS DO?? removed because I think it's useless... // writer.flush(); pageContext.setAttribute("writer", writer.toString()); %>