diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java index 7e031cf3b..9c8a097ef 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java @@ -331,7 +331,8 @@ public class FreemarkerHttpServlet extends VitroHttpServlet { return map; } - // Add variables that should be available only to the page's root map, not to the body. + // Add variables that are needed to generate the page template (they will also be accessible + // to the body template). // RY This is protected instead of private so FreeMarkerComponentGenerator can access. // Once we don't need that (i.e., jsps have been eliminated) we can make it private. protected Map getPageTemplateValues(VitroRequest vreq) { diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/IndividualController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/IndividualController.java index 92729eb88..518d22fc4 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/IndividualController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/IndividualController.java @@ -121,13 +121,15 @@ public class IndividualController extends FreemarkerHttpServlet { body.put("relatedSubject", getRelatedSubject(vreq)); - IndividualTemplateModel ind = getIndividualTemplateModel(vreq, individual); + body.put("headContent", getRdfLinkTag(individual)); + + IndividualTemplateModel itm = getIndividualTemplateModel(vreq, individual); /* We need to expose non-getters in displaying the individual's property list, * since it requires calls to methods with parameters. * This is still safe, because we are only putting BaseTemplateModel objects * into the data model: no real data can be modified. */ - body.put("individual", getNonDefaultBeansWrapper(BeansWrapper.EXPOSE_SAFE).wrap(ind)); + body.put("individual", getNonDefaultBeansWrapper(BeansWrapper.EXPOSE_SAFE).wrap(itm)); body.put("localName", new IndividualLocalNameMethod()); @@ -192,6 +194,14 @@ public class IndividualController extends FreemarkerHttpServlet { return map; } + // + private String getRdfLinkTag(Individual individual) { + String href = individual.getURI() + "/" + individual.getLocalName() + ".rdf"; + String linkTag = " "; + return linkTag; + } + private IndividualTemplateModel getIndividualTemplateModel(VitroRequest vreq, Individual individual) throws ServletException, IOException { diff --git a/webapp/web/templates/freemarker/page/partials/head.ftl b/webapp/web/templates/freemarker/page/partials/head.ftl index 220b3c654..1389b4c3a 100644 --- a/webapp/web/templates/freemarker/page/partials/head.ftl +++ b/webapp/web/templates/freemarker/page/partials/head.ftl @@ -1,11 +1,13 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> - - - - - <#include "title.ftl"> + + + - <#include "stylesheets.ftl"> - - <#include "headScripts.ftl"> \ No newline at end of file +<#include "title.ftl"> + +<#include "stylesheets.ftl"> + +<#include "headScripts.ftl"> + +${headContent!} \ No newline at end of file