Reference Source
import DiscussionPageResolver from 'flarum/resolvers/DiscussionPageResolver'
public class | source

DiscussionPageResolver

Extends:

src/common/resolvers/DefaultResolver.js~DefaultResolver → DiscussionPageResolver

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.

Method Summary

Public Methods
public

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 overriden.

public

makeKey(): *

public

onmatch(args: undefined, requestedPath: undefined, route: undefined): *

public

render(vnode: undefined): *

Public Methods

public canonicalizeDiscussionSlug(slug: undefined): * source

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 overriden.

Params:

NameTypeAttributeDescription
slug undefined

Return:

*

public makeKey(): * source

Return:

*

public onmatch(args: undefined, requestedPath: undefined, route: undefined): * source

Params:

NameTypeAttributeDescription
args undefined
requestedPath undefined
route undefined

Return:

*

public render(vnode: undefined): * source

Params:

NameTypeAttributeDescription
vnode undefined

Return:

*