Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Can we hide the create new button on CMS, and Add task button?

default discord avatar
nullregex2 years ago
7

Can we hide the create new button on CMS, and Add task button?

  • default discord avatar
    hades2000822 years ago

    I don't know the answer here but would be interested to understand the use-case if you can share it?

  • default discord avatar
    notchr2 years ago

    If it's a block config and you only want two entries, you can set the maxRows on the Block config



    This could also be done with CSS but it's messier

  • default discord avatar
    hades2000822 years ago

    Ah, I see now. I thought the screenshot showed a collection listing screen but it's not.



    1. Make your "Todos" a global instead of a collection.


    2. As thisisnotchris says, you can set the maxRows on the block. If you're using an array field I believe you can set max items on that too.

  • default discord avatar
    nullregex2 years ago

    I see thanks for the answers



    How about for the collections



    can we hide the



    Create New?

  • default discord avatar
    jessrynkar2 years ago

    Hi

    @200874031556067330

    there isn't a built-in way to hide the

    create new

    button, you would need to apply custom css here to target this button and set

    display: none

    or similar

  • default discord avatar
    s4chinlast year

    Hey

    @854377910689202256


    Is there anyway to change label of create new button?

  • default discord avatar
    jessrynkarlast year

    Hi

    @307222801448960000

    - not currently, here are the collection components you can currently override >

    https://payloadcms.com/docs/admin/components#collections

    This would be a good feature request, if you want to open a ticket over on our GitHub that would be great!

    https://github.com/payloadcms/payload/discussions/new/choose
Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.