Getting page link

default discord avatar
d33daalast year
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
    notchrlast year

    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
    d33daalast year

    Thanks @notchr , 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 :)

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

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