Hi,
We have a custom component that users fill in values. These values are being used at page generation time such as title, description etc.
It is coming in through to the .java file
But, the .XSL file doesnt seem to get the values into the page scope.
Attached are the 2 files.
public Document getMetaInformation(RequestContext context) {
System.out.println("(bypassing logger)getMetaInformation START");
System.out.println("(bypassing logger)LOGGER.isDebugEnabled() == " + LOGGER.isDebugEnabled());
pageTitle = context.getParameterString("meta_title");
pageKeywords = context.getParameterString("meta_keywords");
pageRobots = context.getParameterString("meta_robots");
pageDescription = context.getParameterString("meta_description");
pageLocale = context.getParameterString("meta_locale_code");
body_class = context.getParameterString("meta_bodyclass");
System.out.println("(bypassing logger)-----------BEGIN MetaGenerator::getTitle() controller method------");
System.out.println("(bypassing logger)----------- MetaGenerator::getMetaInformation() Title =" + pageTitle);
System.out.println("(bypassing logger)----------- MetaGenerator::getMetaInformation() Keywords="+pageKeywords);
System.out.println("(bypassing logger)----------- MetaGenerator::getMetaInformation() pageRobots ="+pageRobots);
System.out.println("(bypassing logger)----------- MetaGenerator::getMetaInformation() Description ="+ pageDescription);
System.out.println("(bypassing logger)----------- MetaGenerator::getMetaInformation() Locale ="+ pageLocale);
System.out.println("(bypassing logger)----------- MetaGenerator::getMetaInformation() body_class ="+ body_class);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("-----------BEGIN MetaGenerator::getTitle() controller method------");
LOGGER.debug("----------- MetaGenerator::getMetaInformation() Title =" + pageTitle);
LOGGER.debug("----------- MetaGenerator::getMetaInformation() Keywords="+pageKeywords);
LOGGER.debug("----------- MetaGenerator::getMetaInformation() pageRobots ="+pageRobots);
LOGGER.debug("----------- MetaGenerator::getMetaInformation() Description ="+ pageDescription);
LOGGER.debug("----------- MetaGenerator::getMetaInformation() Locale ="+ pageLocale);
LOGGER.debug("----------- MetaGenerator::getMetaInformation() body_class ="+ body_class);
}
context.getPageScopeData().put("title", pageTitle);
context.getPageScopeData().put("body_class",body_class);
context.getPageScopeData().put("locale_code",pageLocale.toLowerCase());
context.getPageScopeData().put("keywords", pageKeywords);
context.getPageScopeData().put("robots",pageRobots);
context.getPageScopeData().put("description", pageDescription);
LOGGER.debug("----------- END MetaGenerator::getTitle() controller method ------");
System.out.println("(bypassing logger)getMetaInformation END");
String testje = (String)context.getPageScopeData().get("title");
System.out.println("testje = " + testje);
.XSL file is
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
ls:begin[meta-keywords]
keywords
$PAGE_SCOPE[keywords]
ls:end[meta-keywords]
ls:begin[meta-description]
description
$PAGE_SCOPE[description]
ls:end[meta-description]
ls:begin[meta-robots]
robots
$PAGE_SCOPE[robots]
ls:end[meta-robots]
#include virtual="/admin/script-includes.inc"
$PAGE_SCOPE[head_injection]
ls:begin[body]
$PAGE_SCOPE[body_injection_top]
#include virtual="/$PAGE_SCOPE[locale_code]/admin/header.inc"
None of the PAGE_SCOPE and strLocaleParameter are getting values
Thanks,