Flarum (v2.0.0-beta.5)
    Preparing search index...

    Class DiscussionPageResolver<Attrs, RouteArgs>

    A custom route resolver for DiscussionPage that generates the same key to all posts on the same discussion. It triggers a scroll when going from one post to another in the same discussion.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    routeName: string
    scrollToPostNumber: number | null = null

    Methods

    • Remove optional parts of a discussion's slug to keep the substring that bijectively maps to a discussion object. By default this just extracts the numerical ID from the slug. If a custom discussion slugging driver is used, this may need to be overridden.

      Parameters

      • slug: string | undefined

      Returns string | undefined