cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to know the current page and current page type

Former Member
0 Likes
820

Good evening,

is there a way in Hybris to know in a controller what is the current page ?

I tried cmsPageContextService.getCmsPageRequestContextData(httpRequest).getPage() without success (I have a null value)

Thank you in advance,

David

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi David,

The page will get bind at the last step before the controller responds to the presentation layer. So you will see methods as getPageByLabelOrId() getting added to the model. Ex : storeCmsPageInModel(model, getContentPageForLabelOrId(""));

So, there is nothing which will tell you the current page in advance, it's you who will decide which page will get loaded for which request.

Hope that helps!