Getting page link

default discord avatar
D33DAA
2 weeks ago
3

Based on the payload blog template - what's the best practice way to display the "display URL" on the edit page of a "Page"?

  • default discord avatar
    thisisnotchris
    2 weeks ago

    Hello @D33DAA - Not sure how the blog template handles pages, but I've set up each page as a global to have a lot of control. This may not be ideal for a blog where the pages are consistent and are better suited for a collection. With that being said, you can add custom admin components to collections and globals, defining where they should appear. You should even be able to access the data in the current collection so you could add a component that has the URL



    https://payloadcms.com/docs/admin/components
  • default discord avatar
    D33DAA
    last week

    Thanks @thisisnotchris , I managed to get it working as an admin-bar field. Going to look into how I can make it a clickable link instead, but I'll pursue that as my own adventure :)

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.