/** * Called to to get the title of the web page * * @param originalPage the decorated sitemesh page * @return the title to use */ public String getPageTitle(Page originalPage) { return getPageTitle(originalPage.getTitle()); }
public static String getTitle(IRequestCycle cycle) { return getPage(cycle).getTitle(); }
public final int doEndTag() { try { String title = getPage().getTitle(); if (title == null || title.trim().length() == 0) title = defaultTitle; if (title != null) getOut().write(title); } catch (Exception e) { trace(e); } return EVAL_PAGE; }
public String getTitle() { String title = getSiteMeshPage().getTitle(); return Tapestry.isBlank(title) ? getDefault() : title; } }
private Map<String, Object> getVelocityParams(HttpServletRequest request, Page page, HttpServletResponse response) throws IOException { Map<String, Object> velocityParams = getDefaultVelocityParams(); velocityParams.put("page", page); velocityParams.put("title", page.getTitle()); StringWriter bodyBuffer = new StringWriter(); page.writeBody(OutputConverter.getWriter(bodyBuffer)); velocityParams.put("body", bodyBuffer); if (page instanceof HTMLPage) { HTMLPage htmlPage = (HTMLPage) page; StringWriter buffer = new StringWriter(); htmlPage.writeHead(OutputConverter.getWriter(buffer)); velocityParams.put("head", buffer.toString()); } // This allows the templates to include JSPs, using $dispatcher.include() velocityParams.put("dispatcher", new BufferingRequestDispatcher(request, response)); velocityParams.put("i18n", getJiraAuthenticationContext().getI18nHelper()); velocityParams.put("req", request); return velocityParams; }
String titleHtml = page.getTitle(); if (titleHtml == null || titleHtml.isEmpty()) { titleHtml = "Welcome!";
velocityParams.put("title", page.getTitle());
context.put("head", htmlPage.getHead()); context.put("title",page.getTitle()); context.put("body",page.getBody());
model.put("head", htmlPage.getHead()); model.put("title",page.getTitle()); model.put("body",page.getBody()); model.put("page.properties", new SimpleHash(page.getProperties()));
model.put("head", ((HTMLPage)pageObject).getHead()); model.put("body", pageObject.getBody()); model.put("title", pageObject.getTitle()); model.put("page.properties", pageObject.getProperties()); template.process(model, writer);