/** * Wraps the current content node before passing it to the model. * @param currentContent the actual content * @param mainContent the current "main content" or "page", which might be needed in certain wrapping situations */ protected Content wrapNodeForModel(Content currentContent, Content mainContent) { return new I18nContentWrapper(currentContent); }
/** * Wraps the current content node before exposing it to the template renderer. * @param currentContent the actual content being exposed to the template * @param mainContent the current "main content" or "page", which might be needed in certain wrapping situations * @see info.magnolia.module.templating.paragraphs.JspParagraphRenderer * TODO : return an Object instance instead - more flexibility for the template engine ? */ protected Content wrapNodeForTemplate(Content currentContent, Content mainContent) { return new I18nContentWrapper(currentContent); }
/** * Wraps the current content node before passing it to the model. * @param currentContent the actual content * @param mainContent the current "main content" or "page", which might be needed in certain wrapping situations */ protected Content wrapNodeForModel(Content currentContent, Content mainContent) { return new I18nContentWrapper(currentContent); }
/** * Wraps the current content node before exposing it to the template renderer. * @param currentContent the actual content being exposed to the template * @param mainContent the current "main content" or "page", which might be needed in certain wrapping situations * @see info.magnolia.module.templating.paragraphs.JspParagraphRenderer * TODO : return an Object instance instead - more flexibility for the template engine ? */ protected Content wrapNodeForTemplate(Content currentContent, Content mainContent) { return new I18nContentWrapper(currentContent); }
public Content i18n(Content node) { return new I18nContentWrapper(node); }
public Content i18n(Content node) { return new I18nContentWrapper(node); }
/** * Set contentNode in pagecontext and continue evaluating jsp. * @return int */ @Override public int doEndTag() { // Evaluated content node. Content contentNode = getFirstMatchingNode(); // set attribute if (contentNode != null) { Content mainContent = MgnlContext.getAggregationState().getMainContent(); if (mainContent == null) { mainContent = contentNode; } info.magnolia.cms.util.NodeMapWrapper nmw = new info.magnolia.cms.util.NodeMapWrapper( new I18nContentWrapper(contentNode), mainContent.getHandle()); pageContext.setAttribute(this.var, nmw, this.scope); } else { pageContext.removeAttribute(this.var); } return EVAL_PAGE; }