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

default discord avatar
Jed
6 months ago
9

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

  • default discord avatar
    hades200082
    6 months 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
    notchr
    6 months 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
    hades200082
    6 months 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
    Jed
    6 months ago

    I see thanks for the answers



    How about for the collections



    can we hide the



    Create New?

  • discord user avatar
    jesschow
    Payload Team
    6 months ago

    Hi @Jed 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

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.