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

Documentation is missing details about afterNavLinks #10872

Open
BartTed1 opened this issue Jan 29, 2025 · 1 comment
Open

Documentation is missing details about afterNavLinks #10872

BartTed1 opened this issue Jan 29, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@BartTed1
Copy link

Documentation Issue

In documentation isn't explained how to use admin.components.afterNavLinks. That's fragment of configuration code:

admin: {
    user: Users.slug,
    importMap: {
      baseDir: path.resolve(dirname),
    },
    components: {
      views: {
        '/tasks': {
          Component: '/components/CronControl#CronControl',
          path: '/tasks',
        },
      },
      afterNavLinks: [
      ],
    },
  },

Additional Details

Only one occurrence of 'afterNavLinks':
https://payloadcms.com/docs/admin/components#root-components

I want to add link to /tasks view into navigation bar. Is this possible?

@BartTed1 BartTed1 added the documentation Improvements or additions to documentation label Jan 29, 2025
@akhrarovsaid
Copy link
Contributor

akhrarovsaid commented Jan 30, 2025

Hey @BartTed1,

Have you seen this wonderful example for custom components? It includes declaring afterNavLinks in config and how to use them as server components.

I think the docs generally do a good job of introducing custom components, but can and will improve here. Hopefully the link I share above is helpful to you in the meantime.

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
Projects
None yet
Development

No branches or pull requests

2 participants