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

Docs: Explain how to conditionally hide pages #1228

Merged
merged 3 commits into from
Jan 13, 2022

Conversation

DistantOrbit
Copy link
Contributor

Added a paragraph about how to use shouldRegisterNavigation() in page classes to docs.

@DistantOrbit DistantOrbit changed the title Docs Docs: Explain how to conditionally hide pages Jan 13, 2022
@danharrin danharrin added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 13, 2022
@danharrin danharrin merged commit d3448a5 into filamentphp:2.x Jan 13, 2022
@danharrin
Copy link
Member

Thanks :)

@robertorinaldi-dev
Copy link
Contributor

@danharrin what are the cons in directly making a method that accepts a closure and takes care of the rest automatically? Maybe canView() like for widgets?

@danharrin
Copy link
Member

The cons are that every page has different mount() parameters, so if we add mount() to the base Page class we effectively stop people from using mount parameters.

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

Successfully merging this pull request may close these issues.

None yet

3 participants