Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question:it possible to implement dynamic _meta #3745

Open
bazijun opened this issue Nov 28, 2024 · 3 comments
Open

Question:it possible to implement dynamic _meta #3745

bazijun opened this issue Nov 28, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@bazijun
Copy link

bazijun commented Nov 28, 2024

I want to add permissions to some routes in my document. I need to dynamically control the display of _meta. Is it supported?

@bazijun bazijun added the enhancement New feature or request label Nov 28, 2024
@bazijun bazijun changed the title Questionis:it possible to implement dynamic _meta Question:it possible to implement dynamic _meta Nov 28, 2024
@dimaMachina
Copy link
Collaborator

Please add more details what do you mean by dynamic control, but I think it's not possible

@bazijun
Copy link
Author

bazijun commented Dec 2, 2024

My current scenario is that users with different permission cookies will see documents with different menu structures. Although I have achieved this by modifying normalizepagesresult, I still want to know if there is a better way

@dimaMachina
Copy link
Collaborator

in v4 you can modify pageMap directly in the layout file

if (lang === 'en') {
pageMap = [
...pageMap,
{
name: 'remote',
route: '/remote',
children: [graphqlEslintPageMap, graphqlYogaPageMap]
}
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants