Earlier when we were using DXA CTP 2, ${pageModel.meta.sitemapKeyword}
would give us the Page navigation Keyword.
Since we moved to DXA 2.0, this returns no value. We are not sure if this is related to version change.
One piece of information: In the generic Page Controller, I have autowired NavigationProvider
to call the get breadcrumb navigation links for other functions.
@Controller
public class GenericPageController {
@Autowired
private PageController pageController;
@Autowired
private WebRequestContext webRequestContext;
int publicationId = 0;
Localization localization;
@Autowired
private NavigationProvider navigationProvider;
@RequestMapping(value = {"/en/**", "/ar/**"}, produces = {"text/html", "*/*"}, method = {RequestMethod.GET, RequestMethod.POST})
public String handleGetPage(HttpServletRequest request, HttpServletResponse response) throws Exception {
PageModel pageModel = (PageModel) request.getAttribute("pageModel");
pageModel = this.enrichGetPageModel(pageModel, request);
NavigationLinks navigationLinks = navigationProvider.getBreadcrumbNavigationLinks(requestPath, localization);
List<Link> items = navigationLinks.getItems();
....
pageModel.getMeta().put("og:keywords" , seoKeyword); // based on my navigation links
request.setAttribute("pageModel", pageModel);
return view;
}
}
@Rick, yes the navigation keyword is seen in the page json.
"MvcData": {
"ViewName": "WebInsidePage",
"AreaName": "Generic"
},
"XpmMetadata": {
"PageID": "tcm:27-625-64",
"PageModified": "2018-04-09T13:46:29",
"PageTemplateID": "tcm:27-639-128",
"PageTemplateModified": "2018-03-29T14:18:20"
},
"Metadata": {
"sitemapKeyword": {
"$type": "KeywordModelData",
"Id": "777"
}
},
"SchemaId": "633"
}
Page template does not use RPC TBB. One template is shown below:
<CompoundTemplate xmlns="http://www.tridion.com/ContentManager/5.3/CompoundTemplate">
<TemplateInvocation>
<Template xlink:href="tcm:22-874-2048" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:title="Generate DXA R2 Page Model" />
<TemplateParameters>
<Parameters xmlns="http://www.sdl.com/web/schemas/dynamicpage" />
</TemplateParameters>
</TemplateInvocation>
<TemplateInvocation>
<Template xlink:href="tcm:22-886-2048" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:title="Default Page Template Finish Actions" />
<TemplateParameters></TemplateParameters>
</TemplateInvocation>
</CompoundTemplate>
Meta
?Meta
and aMetadata
property. You are referring to the first (${pageModel.meta.sitemapKeyword}
), but it is not shown in your JSON fragment.