Skip to content

Add Route priority #28

@marten-cz

Description

@marten-cz

It will be nice to be able to define priority of the routes. When using more extensions or extension with Nette's RouterFactory, I'll need to be able to define priority. Now it will add the router from module at the end.
Not sure how to define or where it will had to be implemented.

Extension1:

/**
 * @priority 2
 */
public function getRoutesDefinition() { ..... }

Extension2:

/**
 * @priority 1
 */
public function getRoutesDefinition() { ..... }

Even if extension2 is initialized after extension1, it will add the router before router from extension2, because it has higher priority.

Would that be possible or right now this is limitation in Nette?

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