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.

Tree-like structure for content

default discord avatar
kvist__2 years ago
1

Hi



I'm trying to create a content-tree. I've figured out how to use

afterNavLinks

and want to do something like the attached image.


How do I get the pages when i'm in the state of the

afterNavLinks

component? 🙂

  • discord user avatar
    jesschow
    2 years ago

    Hi @Kvist you could use the local API like this:



      const pages = await payload.find({
        collection: "pages",
      });
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.