You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, I'm using SSR render on next.js and I want to use drupal.getMenu passing the header cf-ipcountry that i receive on each request depending on the user's country. this isn't related to translation of the menu.
for regulatory reason, i have a case where depending on the country the menu tree change slightly. on drupal side i have only menu and some items are not render in the json of the menu tree if they are not allowed to be displayed in this country.
i saw that it is possible to pass some custom header globally when initializing the drupal client but i didn't found any solution to pass a custom header dynamically when we use the fonction drupal.getMenu.
Maybe i'm wrong so i'm asking to you if that exists, or if we could have a such feature at the call level for getMenu and the others functions line getResourceCollection and so on as well.
The text was updated successfully, but these errors were encountered:
Package
next-drupal (NPM package)
Ask the question
Basically, I'm using SSR render on next.js and I want to use drupal.getMenu passing the header cf-ipcountry that i receive on each request depending on the user's country. this isn't related to translation of the menu.
for regulatory reason, i have a case where depending on the country the menu tree change slightly. on drupal side i have only menu and some items are not render in the json of the menu tree if they are not allowed to be displayed in this country.
i saw that it is possible to pass some custom header globally when initializing the drupal client but i didn't found any solution to pass a custom header dynamically when we use the fonction drupal.getMenu.
Maybe i'm wrong so i'm asking to you if that exists, or if we could have a such feature at the call level for getMenu and the others functions line getResourceCollection and so on as well.
The text was updated successfully, but these errors were encountered: