I need to add a custom button in Nav element, the sidebar in the admin interface. What would be the best way to do that?
Hey @PegasusFJ this is easy to do by adding the
beforeNavLinks
and
afterNavLinks
properties to your payload config, you can read about this here:
https://payloadcms.com/docs/admin/components#base-component-overridesAnd see an example here:
https://github.com/payloadcms/payload/tree/master/test/admin/componentsYeah but polyfilling the collection list view that I got from a example didn't quit work, I wasn't able to import the ListView component. It errored that I needed to setup webpack config to resolve the import.
@dumbledore this thread might help you
https://discord.com/channels/967097582721572934/1075680408869539892Yeah I checked that out when I was trying to figure out how to add a custom component, so I followed the instructions in that thread, and then I got the webpack resolver error.
Hey @dumbledore if you still need help with this error, let's open another thread!
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.