Skip to content

Get the next/prev document for a document #1278

@wouterj

Description

@wouterj

Feature request

This may well be something supported in Guides already and I missed it. So more of a "how would you approach this" discussion than a true feature request.

For symfony.com, we need to generate fjson files. These contain the HTML body and some metadata of the document, like its title and parents. It also includes the Previous and Next document. See wouterj/symfony-docs-guides#8 for my attempt to create a JSON renderer.

However, I have trouble finding the prev/next file for the currently rendered file. In the referenced PR, you can see my attempt of using DocumentListIterator. But this iterator seems to not be sorted according to the toctree (or the toctree order is wrong?).

Do we need to implement something to create an ordered list of documents early in the render phase? Or is this already done by Guides and should we expose this to the renderer somehow?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions