2

I'm having problem using the page includes for setting up a header component called TelenorHeader under my own areaName (Telenor).

In my page template "TelenorPage" under the metadata schema I have added an include to: system/include/telenorheader

The setup for the rest of the page template is: Page View Name : Telenor:TelenorPage I have also tried to setup some Regions Metadata here to: - Region View Name: Telenor:TelenorHeader - Region Name: Telenor:TelenorHeader enter image description here

The TelenorHeader page it is setup with the include page template (no meta data). enter image description here

In my TelenorModuleInitializer I have this setup

@ComponentScan("no.telenor.modules.Telenor")
@Component
@RegisteredViewModels({
// PAGE TEMPLATES
@RegisteredViewModel(viewName = "TelenorPage", modelClass = PageModelImpl.class),
// REGION TEMPLATES
@RegisteredViewModel(viewName = "TelenorHeader", modelClass = RegionModelImpl.class),
// COMPONENT TEMPLATES
@RegisteredViewModel(viewName = "TelenorTeaser", modelClass = TelenorTeaserModel.class),
@RegisteredViewModel(viewName = "TelenorHeaderTop", modelClass = TelenorHeaderTop.class),
})

@ModuleInfo(name = "Telenor MVC module", areaName = "Telenor", description = "DXA module which contains Telenor MVC")
public class TelenorModuleInitializer extends AbstractInitializer {
@Override
protected String getAreaName() {
    return "Telenor";
}
}

Under the WEB-INF/Views/Telenor/Region I have created the TelenorHeader.jsp View

When I run it all the Pages and Entities views that I have under my Telenor folder works as intended but for the Region I get an error telling me it is trying to get the region view from the Core folder. Why is it not mapping correctly to my custom Telenor module?

16:05:38.263 [http-nio-8080-exec-9] ERROR c.s.w.c.impl.taglib.dxa.RegionTag - Error while processing region tag
javax.servlet.ServletException: File [/WEB-INF/Views/Core/Region/TelenorHeader.jsp] not found
at     org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:407) [jasper.jar:8.5.4]

1 Answer 1

1

For include Pages, the (qualified) View Name is obtained from the Page Title. See https://github.com/sdl/dxa-content-management/issues/3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.