Skip to content

Feature request: draft preview URL for a page #151

Description

@jsirish

Filed from the dynamic/daisy-content audit.

There is currently no way to ask the API "where can I look at this page as it stands on draft". A caller can compose a page, verify parity, and publish — but it cannot hand a human a link.

That's the gap that matters most for the intended end user. The flow we're building toward is a marketer asking a chat assistant to build a landing page; the assistant composes it on draft and then needs to say "here it is — have a look before I publish." Without a preview URL the only options are "trust me" or "go find it in the CMS yourself", and neither is a workflow anyone will use twice.

The module has everything needed — the record, its stage, and SilverStripe's own draft-preview mechanism. Nothing in the surveyed CMS-MCP landscape does this well either, so it's a genuine differentiator rather than table stakes.

Proposed

Return a preview URL for a SiteTree record — either as an extra field on the serialized record (meta, or the response envelope, so it doesn't collide with model fields), or as its own small read endpoint.

Design questions worth settling first:

  • Stage link vs. authenticated preview. A bare ?stage=Draft link only works for someone already logged into the CMS with VIEW_DRAFT_CONTENT. That's fine for an agency user and useless for a client stakeholder. A time-limited signed preview token would serve both, at the cost of being a new auth surface.
  • Whether it should respect the caller's own draft-view permission (it should — the same per-record ACL as every other read).
  • Interaction with Feature request: path/URL-based record addressing for SiteTree #121 (path/URL-based record addressing), which overlaps on the "what is this page's URL" question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions