on ‎2018 Sep 26 6:50 PM
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
Request clarification before answering.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.