method

AdminCollectionList.documentHref

Build a document destination for your collection card or row link.

Example

ts
<Link to={list.documentHref(document)}>
  {list.title(document)}
</Link>

Arguments

ArgumentTypeDescription
documentFieldDocumentOne document from list.documents.

Returns

A router-root URL such as /collections/posts/123?locale=en, ready for a Link to prop.

string

How it works

Returns a router-root path with an encoded document ID and the current content locale. Pass it to Link from @riducms/admin/routing; Link adds the configured admin base path.

You own the link's markup, appearance, and content. Keep selection buttons outside a linked card.

Full signature

Related types

  • FieldDocument

    The authoring-safe document shape exposed to extension components.

Related guides