+ protected String getPageTitle(FreenetRequest request) {
+ String postId = request.getHttpRequest().getParam("post");
+ Optional<Post> post = webInterface.getCore().getPost(postId);
+ String title = "";
+ if (post.isPresent()) {
+ title = post.get().getText().substring(0, Math.min(20, post.get().getText().length())) + "…";
+ title += " - " + SoneAccessor.getNiceName(post.get().getSone()) + " - ";
+ }
+ title += webInterface.getL10n().getString("Page.ViewPost.Title");
+ return title;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {