Skip to content

filters

Alexander Söderberg edited this page Nov 4, 2017 · 2 revisions

Filters are used to determine which view gets to serve the incoming requests. Each filter is made up of different parts, there are four types of parts:

  • Separators - / and . - Used like a path separator
  • Static - Example: user - A static string
  • Required Variable - Example: <username>
  • Optional Variable - Example: [page]
    • Can also have a default value, like: [page=index] where page is the variable name and index is the default value

Examples

user/<username> - Serves user/Citymonstret, but not user/ or user/Citymonstret/other

news/[page=1] - Serves news (as news/1), news/1, news/foo but not news/foo/bar

user/<username>/posts/[page] - Serves user/Citymonstret/posts and user/Citymonstrst/posts/10

To add an optional file extension, do: [page].[extension=html] - Will direct requests to ${page}.html or ${page}.${extension}

Filtering / Validation

There is no filtering of variable. That is done using Middleware

Navigation

Templates

Configuration

Files can be found in .kvantum/config

Views

/commands

Development

Clone this wiki locally