This is the 40ants-routes Reference Manual, version 0.4.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Jul 13 21:53:03 2025 GMT+0.
40ants-routes
40ants-routes/route
40ants-routes/errors
40ants-routes/url-pattern
40ants-routes/generics
40ants-routes/vars
40ants-routes/routes
40ants-routes/included-routes
40ants-routes/with-url
40ants-routes/matched-route
40ants-routes/find-route
40ants-routes/defroutes
40ants-routes/route-url
40ants-routes/utils
40ants-routes/breadcrumbs
40ants-routes/add-route
40ants-routes/40ants-routes.asd
40ants-routes/route/file-type.lisp
40ants-routes/errors/file-type.lisp
40ants-routes/url-pattern/file-type.lisp
40ants-routes/generics/file-type.lisp
40ants-routes/vars/file-type.lisp
40ants-routes/routes/file-type.lisp
40ants-routes/included-routes/file-type.lisp
40ants-routes/with-url/file-type.lisp
40ants-routes/matched-route/file-type.lisp
40ants-routes/find-route/file-type.lisp
40ants-routes/defroutes/file-type.lisp
40ants-routes/route-url/file-type.lisp
40ants-routes/utils/file-type.lisp
40ants-routes/breadcrumbs/file-type.lisp
40ants-routes/add-route/file-type.lisp
40ants-routes/generics
40ants-routes/matched-route
40ants-routes/errors
40ants-routes/utils
40ants-routes/with-url
40ants-routes/vars
40ants-routes/breadcrumbs
40ants-routes/route-url
40ants-routes/url-pattern
40ants-routes/add-route
40ants-routes/defroutes
40ants-routes/route
40ants-routes/included-routes
40ants-routes/routes
40ants-routes/find-route
The main system appears first, followed by any subsystem dependency.
40ants-routes
40ants-routes/route
40ants-routes/errors
40ants-routes/url-pattern
40ants-routes/generics
40ants-routes/vars
40ants-routes/routes
40ants-routes/included-routes
40ants-routes/with-url
40ants-routes/matched-route
40ants-routes/find-route
40ants-routes/defroutes
40ants-routes/route-url
40ants-routes/utils
40ants-routes/breadcrumbs
40ants-routes/add-route
40ants-routes
Framework agnostic URL routing library.
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-40README-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
# 40ants-routes - Framework agnostic URL routing library
<a id="40-ants-routes-asdf-system-details"></a>
## 40ANTS-ROUTES ASDF System Details
* Description: Framework agnostic ‘URL‘ routing library.
* Licence: Unlicense
* Author: Alexander Artemenko <svetlyak.40wt@gmail.com>
* Homepage: [https://40ants.com/routes][7261]
* Bug tracker: [https://github.com/40ants/routes/issues][54bf]
* Source control: [GIT][6959]
* Depends on: [alexandria][8236], [cl-ppcre][49b9], [serapeum][c41d], [split-sequence][3dcd], [str][ef7f]
<a id="overview"></a>
## Overview
40ants-routes is a framework-agnostic ‘URL‘ routing library for Common Lisp, inspired by Django’s ‘URL‘ routing system. It provides a clean and flexible way to define ‘URL‘ routes, generate ‘URL‘s, and handle ‘URL‘ parameters.
<a id="features"></a>
## Features
* Defining routes with namespaces.
* Including routes from libraries into applications.
* Matching ‘URL‘ while extracting parameters from it.
* Generating ‘URL‘s based on route names.
* Generating breadcrumbs.
<a id="installation"></a>
## Installation
“‘lisp
(ql:quickload :40ants-routes)
“‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-40USAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## Usage Examples
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-40DEFINING-ROUTES-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### Defining Routes
Routes can be defined using the [‘40ants-routes/defroutes:defroutes‘][3455] macro.
Inside it’s body, use [‘40ants-routes/defroutes:get‘][f902], [‘40ants-routes/defroutes:post‘][a861], macro
to define final routes in the collection.
“‘
(uiop:define-package #:test-routes
(:use #:cl)
(:shadowing-import-from #:40ants-routes/defroutes
#:defroutes
#:include
#:get
#:post)
(:import-from #:40ants-routes/route-url
#:route-url)
(:import-from #:40ants-routes/handler
#:call-handler)
(:import-from #:40ants-routes/with-url
#:with-partially-matched-url
#:with-url))
(in-package #:test-routes)
(defroutes (*blog-routes* :namespace "blog")
(get ("/" :name "index")
(format t "Handler for blog index was called."))
(get ("/<string:slug>" :name "post")
(format t "Handler for blog post ~S was called."
slug)))
“‘
Routes, defined by this [‘40ants-routes/defroutes:defroutes‘][3455] are stored in ‘*blog-routes*‘ variable
and can be used either to [‘40ants-routes/defroutes:include‘][2897] these routes into the route hierarchy,
or to search a route, matched to the ‘URL‘. See section [‘Matching the URL‘][af0d].
Here’s an example demonstrating how to use an integer ‘URL‘ parameter:
“‘lisp
(defroutes (*article-routes* :namespace "articles")
(get ("/" :name "index")
(format t "Handler for articles index was called."))
(get ("/<int:id>" :name "article")
(format t "Handler for article with ID ~D was called."
id)))
“‘
In this example, the route will match ‘URL‘s like ‘/123‘ and the argument ‘ID‘ will be parsed as an integer.
You can also capture the rest of the ‘URL‘ as a parameter using the ‘.*‘ regex pattern:
“‘lisp
(defroutes (*file-routes* :namespace "files")
(get ("/" :name "index")
(format t "Handler for files index was called."))
(get ("/<.*:path>" :name "file")
(format t "Handler for file at path ~S was called."
path)))
“‘
This will match ‘URL‘s like ‘/documents/reports/annual/2023.pdf‘ and capture the entire path
‘documents/reports/annual/2023.pdf‘ as the ‘PATH‘ argument.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-40INCLUDING-ROUTES-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### Including Routes
Routes from libraries can be included in application routes using
[‘40ants-routes/defroutes:include‘][2897] function.
This way they can form a hyerarchy:
“‘lisp
(defroutes (*app-routes* :namespace "app")
(get ("/" :name "index")
(format t "Handler for application’s index page."))
(include *blog-routes*
:path "/blog/"))
“‘
In it’s turn, ‘*blog-routes*‘ might also include other routes itself.
This allows to build a composable web-applications and libraries. For example,
some library might build routes to show the list of objects, show details about an object,
edit it and delete. Then such routes can be included into a more complex application.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-40MATCHING-THE-URL-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### Matching the URL
Imagine, user have opened the ‘URL‘ with a path like this ‘/blog/some-post‘.
Then in your web-application you might setup the context in which this route
processing should happen. Use [‘40ants-routes/with-url:with-url‘][1c5e] or [‘40ants-routes/with-url:with-partially-matched-url‘][1a23]
macros to setup the context. Inside the context you can use [‘call-handler‘][e530] function to call
a body of the route, matched to the ‘URL‘:
“‘lisp
TEST-ROUTES> (with-url (*app-routes* "/blog/some-post")
(call-handler))
Handler for blog post "some-post" was called.
TEST-ROUTES> (with-url (*app-routes* "/blog/")
(call-handler))
Handler for blog index was called.
TEST-ROUTES> (with-url (*app-routes* "/")
(call-handler))
Handler for application’s index page.
“‘
[‘40ants-routes/with-url:with-url‘][1c5e] will signal [‘40ants-routes/errors:no-route-for-url-error‘][2977]
error if there is no route matching the whole ‘URL‘, but [‘40ants-routes/with-url:with-partially-matched-url‘][1a23] will
try to do the best it can.
So, inside the [‘40ants-routes/with-url:with-url‘][1c5e] body you can use [‘call-handler‘][e530]
always, while inside the [‘40ants-routes/with-url:with-partially-matched-url‘][1a23] macro handler should be called only if
[‘40ants-routes/route:current-route-p‘][087c] function returns T.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-40GENERATING-URLS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### Generating URLs
Another feature of ‘40ants-routes‘ is ‘URL‘ generation.
‘URL‘s can be generated using the [‘40ants-routes/route-url:route-url‘][fe8a] function. Like
[‘call-handler‘][e530], it should be called when ‘URL‘ context is available.
In our application routes tree there are two ‘index‘ routes, but we can get paths to both of them
using namespaces. Route’s namespace is defined as a list of names from the root route, given
to the [‘with-url‘][1c5e] macro up to the matched route. Each [‘defroutes‘][3455] form or a call to [‘include‘][2897] form
create an object having the name. These names are added to the current route’s namespace.
Imagine we are on the blog-post page and we want to get path to all blog posts. Easiest way
to do this, is to call [‘route-url‘][fe8a] function with only route name:
“‘lisp
TEST-ROUTES> (with-url (*app-routes* "/blog/some-post")
(route-url "index"))
"/blog/"
“‘
But this will not work if the user is on the root page:
“‘lisp
TEST-ROUTES> (with-url (*app-routes* "/")
(route-url "index"))
"/"
“‘
You might want to make ‘URL‘ resolution more stable, especially if these ‘URL‘s are used in some common
page parts such as header or footer. In this case, help ‘URL‘ resolver by giving it a namespace:
“‘lisp
TEST-ROUTES> (with-url (*app-routes* "/")
(route-url "index"
:namespace ’("app" "blog")))
"/blog/"
“‘
Note, when you are building a reusable component which creates it’s own ‘40ants-routes/routes:routes‘ ([‘1‘][77f9] [‘2‘][cce3])
object, you should not use these absolute namespaces, because you don’t know beforehand which namespace
will be used by user when including the component’s routes.
Let’s update our blog component routes and add one to edit the blog post:
“‘lisp
TEST-ROUTES> (defroutes (*blog-routes* :namespace "blog")
(get ("/" :name "index")
(format t "Handler for blog index was called."))
(get ("/<string:slug>" :name "post")
(format t "Handler for blog post ~S was called.~
To edit post go to ~S."
slug
(route-url "edit-post"
:slug slug)))
(get ("/<string:slug>/edit" :name "edit-post")
(format t "Handler for blog post ~S edit form was called."
slug)))
#<40ANTS-ROUTES/ROUTES:ROUTES "blog" 3 subroutes>
“‘
Note, how we did use [‘route-url‘][fe8a] inside the ‘/<string:slug>‘ handler to get
path to the post edit page.
Now, let’s try to call this handler when this blog’s routes are included
into the application routes:
“‘lisp
TEST-ROUTES> (with-url (*app-routes* "/blog/some-post")
(call-handler))
Handler for blog post "some-post" was called.To edit post go to "/blog/some-post/edit".
“‘
See, it did return ‘/blog/some-post/edit‘ path to the edit page and there wasn’t need to specify
a namespace at all!
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-40GENERATING-BREADCRUMBS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### Generating Breadcrumbs
Breadcrumbs can be generated using the [‘40ants-routes/breadcrumbs:get-breadcrumbs‘][bd21] function. This function returns a list of [‘40ants-routes/breadcrumbs:breadcrumb‘][e419] objects that represent the path from the root to the current page.
Each [‘40ants-routes/breadcrumbs:breadcrumb‘][e419] object has the following properties:
- The ‘URL‘ path to the breadcrumb (accessible via [‘40ants-routes/breadcrumbs:breadcrumb-path‘][3f6e])
- The display title for the breadcrumb (accessible via [‘40ants-routes/breadcrumbs:breadcrumb-title‘][b28f])
- The route object associated with the breadcrumb (accessible via [‘40ants-routes/breadcrumbs:breadcrumb-route‘][920e])
To use breadcrumbs, you need to define routes with titles:
“‘lisp
(defroutes (*admin-users-routes* :namespace "users")
(post ("/" :name "users"
:title "Users")
(format nil "Users list"))
(get ("/<string:username>"
:name "user"
:title "User Profile")
(format nil "User profile: ~A" username)))
(defroutes (*admin-routes* :namespace "admin")
(get ("/" :name "admin-index" :title "Admin")
(format nil "Admin index"))
(include *admin-users-routes*
:path "/users/"))
(defroutes (*app-routes* :namespace "app")
(get ("/" :name "index" :title "Home")
(format nil "App index"))
(include *admin-routes*
:path "/admin/"))
“‘
Then, you can generate breadcrumbs for a specific ‘URL‘:
“‘lisp
TEST-ROUTES> (with-url (*app-routes* "/admin/users/john")
(let ((crumbs (40ants-routes/breadcrumbs:get-breadcrumbs)))
;; This way you can get all paths or titles:
(values
(mapcar #’40ants-routes/breadcrumbs:breadcrumb-path crumbs)
(mapcar #’40ants-routes/breadcrumbs:breadcrumb-title crumbs))))
("/" "/admin/" "/admin/users/" "/admin/users/john")
("Home" "Admin" "Users" "User Profile")
“‘
or to generate an ‘HTML‘ code like this:
“‘lisp
TEST-ROUTES> (with-url (*app-routes* "/admin/users/john")
(let ((crumbs (40ants-routes/breadcrumbs:get-breadcrumbs)))
(format t "<nav aria-label=\"breadcrumb\">~%")
(format t " <ol class=\"breadcrumb\">~%")
(loop for crumb in crumbs
for last-p = (eq crumb (car (last crumbs)))
do (format t " <li class=\"breadcrumb-item~:[~; active~]\"~:[~; aria-current=\"page\"~]>~%"
last-p last-p)
(if last-p
(format t " ~A~%" (40ants-routes/breadcrumbs:breadcrumb-title crumb))
(format t " <a href=\"~A\">~A</a>~%"
(40ants-routes/breadcrumbs:breadcrumb-path crumb)
(40ants-routes/breadcrumbs:breadcrumb-title crumb)))
(format t " </li>~%"))
(format t " </ol>~%")
(format t "</nav>~%")))
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/">Home</a>
</li>
<li class="breadcrumb-item">
<a href="/admin/">Admin</a>
</li>
<li class="breadcrumb-item">
<a href="/admin/users/">Users</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
User Profile
</li>
</ol>
</nav>
“‘
For more advanced usage, you can also use functions as route titles to generate dynamic titles based on ‘URL‘ parameters. This is demonstrated in the test file:
First, you need to define a function which will accept an arguments extracted from ‘URL‘:
“‘lisp
(defun get-user-name (&key username &allow-other-keys)
"A function for retrieving user display names based on username parameter"
(cond
((string= username "john")
"John Smith")
((string= username "jane")
"Jane Doe")
(t
(format nil "User: ~A" username))))
“‘
Then redefine routes, to use this function as ‘TITLE‘ argument of the route:
“‘
(defroutes (*admin-users-routes* :namespace "users")
(post ("/" :name "users" :title "Users")
(format nil "Users list"))
(get ("/<string:username>"
:name "user"
;; Example of using a function for retrieving
;; route title dynamically at runtime:
:title #’get-user-name)
(format nil "User profile: ~A" username)))
“‘
And now you will get a real user’s name as the last breadcrumb title:
“‘lisp
TEST-ROUTES> (with-url (*app-routes* "/admin/users/john")
(let ((crumbs (40ants-routes/breadcrumbs:get-breadcrumbs)))
(values
(mapcar #’40ants-routes/breadcrumbs:breadcrumb-path crumbs)
(mapcar #’40ants-routes/breadcrumbs:breadcrumb-title crumbs))))
("/" "/admin/" "/admin/users/" "/admin/users/john")
("Home" "Admin" "Users" "John Smith")
“‘
This makes it easy to create meaningful breadcrumb navigation that adapts to the content being displayed.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-40API-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## API Reference
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FBREADCRUMBS-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/BREADCRUMBS
<a id="x-28-23A-28-2825-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FBREADCRUMBS-22-29-20PACKAGE-29"></a>
#### [package](80be) ‘40ants-routes/breadcrumbs‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FBREADCRUMBS-3FClasses-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Classes
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FBREADCRUMBS-24BREADCRUMB-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### BREADCRUMB
<a id="x-2840ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-20CLASS-29"></a>
###### [class](6b1c) ‘40ants-routes/breadcrumbs:breadcrumb‘ ()
**Readers**
<a id="x-2840ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-PATH-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-29-29"></a>
###### [reader](895a) ‘40ants-routes/breadcrumbs:breadcrumb-path‘ (breadcrumb) (:path)
<a id="x-2840ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-ROUTE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-29-29"></a>
###### [reader](27fe) ‘40ants-routes/breadcrumbs:breadcrumb-route‘ (breadcrumb) (:route)
<a id="x-2840ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-TITLE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-29-29"></a>
###### [reader](5dcf) ‘40ants-routes/breadcrumbs:breadcrumb-title‘ (breadcrumb) (:title)
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FBREADCRUMBS-3FFunctions-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Functions
<a id="x-2840ANTS-ROUTES-2FBREADCRUMBS-3AGET-BREADCRUMBS-20FUNCTION-29"></a>
##### [function](53c4) ‘40ants-routes/breadcrumbs:get-breadcrumbs‘
Generate breadcrumbs list for the current ‘URL‘ set by [‘40ants-routes/with-url:with-url‘][1c5e] macro.
<a id="x-2840ANTS-ROUTES-2FBREADCRUMBS-3AMAKE-BREADCRUMB-20FUNCTION-29"></a>
##### [function](dec1) ‘40ants-routes/breadcrumbs:make-breadcrumb‘ title
Creates a breadcrumb item.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FDEFROUTES-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/DEFROUTES
<a id="x-28-23A-28-2823-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FDEFROUTES-22-29-20PACKAGE-29"></a>
#### [package](31be) ‘40ants-routes/defroutes‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FDEFROUTES-3FFunctions-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Functions
<a id="x-2840ANTS-ROUTES-2FDEFROUTES-3AINCLUDE-20FUNCTION-29"></a>
##### [function](c5b9) ‘40ants-routes/defroutes:include‘ routes &key (path "/")
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FDEFROUTES-3FMacros-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Macros
<a id="x-2840ANTS-ROUTES-2FDEFROUTES-3ADEFROUTES-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>
##### [macro](f7eb) ‘40ants-routes/defroutes:defroutes‘ (var-name &key namespace (routes-class ’routes)) &body route-definitions
Define a variable holding collection of routes and binds it to a variable ‘VAR-NAME‘.
This macro acts like a ‘DEFVAR‘ - if there is already an ‘40ants-routes/routes:routes‘ ([‘1‘][77f9] [‘2‘][cce3])
object bound to the variable, then it is not replaced, but updated inplace.
This allows to change routes on the fly even if they were included into some routes
hierarchy.
You can use ‘ROUTES-CLASS‘ argument to supply you own class, inherited from ‘routes‘ ([‘1‘][77f9] [‘2‘][cce3]).
This way it might be possible to special processing for these routes, for example,
inject some special code for representing this routes in the "breadcrumbs".
Use [‘get‘][f902], [‘post‘][a861], [‘put‘][c587], ‘DELETE‘ macros in ‘ROUTE-DEFINITIONS‘ forms.
See more examples how to define routes in the
[‘Defining Routes‘][d39a] section.
<a id="x-2840ANTS-ROUTES-2FDEFROUTES-3AGET-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>
##### [macro](8a76) ‘40ants-routes/defroutes:get‘ (path &key name title (route-class ’route)) &body handler-body
<a id="x-2840ANTS-ROUTES-2FDEFROUTES-3APOST-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>
##### [macro](bb9a) ‘40ants-routes/defroutes:post‘ (path &key name title (route-class ’route)) &body handler-body
<a id="x-2840ANTS-ROUTES-2FDEFROUTES-3APUT-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>
##### [macro](aba5) ‘40ants-routes/defroutes:put‘ (path &key name title (route-class ’route)) &body handler-body
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FERRORS-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/ERRORS
<a id="x-28-23A-28-2820-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FERRORS-22-29-20PACKAGE-29"></a>
#### [package](2356) ‘40ants-routes/errors‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FERRORS-3FClasses-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Classes
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FERRORS-24ARGUMENT-MISSING-ERROR-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### ARGUMENT-MISSING-ERROR
<a id="x-2840ANTS-ROUTES-2FERRORS-3AARGUMENT-MISSING-ERROR-20CONDITION-29"></a>
###### [condition](4f03) ‘40ants-routes/errors:argument-missing-error‘ (error)
**Readers**
<a id="x-2840ANTS-ROUTES-2FERRORS-3AARGUMENT-MISSING-ERROR-PARAMETER-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3AARGUMENT-MISSING-ERROR-29-29"></a>
###### [reader](4f03) ‘40ants-routes/errors:argument-missing-error-parameter‘ (argument-missing-error) (:missing-parameter)
<a id="x-2840ANTS-ROUTES-2FERRORS-3AARGUMENT-MISSING-ERROR-ROUTE-NAME-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3AARGUMENT-MISSING-ERROR-29-29"></a>
###### [reader](4f03) ‘40ants-routes/errors:argument-missing-error-route-name‘ (argument-missing-error) (:route-name)
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FERRORS-24NAMESPACE-DUPLICATION-ERROR-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### NAMESPACE-DUPLICATION-ERROR
<a id="x-2840ANTS-ROUTES-2FERRORS-3ANAMESPACE-DUPLICATION-ERROR-20CONDITION-29"></a>
###### [condition](ac63) ‘40ants-routes/errors:namespace-duplication-error‘ (error)
**Readers**
<a id="x-2840ANTS-ROUTES-2FERRORS-3AEXISTING-NAMESPACE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3ANAMESPACE-DUPLICATION-ERROR-29-29"></a>
###### [reader](ac63) ‘40ants-routes/errors:existing-namespace‘ (namespace-duplication-error) (:namespace)
<a id="x-2840ANTS-ROUTES-2FERRORS-3AEXISTING-ROUTE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3ANAMESPACE-DUPLICATION-ERROR-29-29"></a>
###### [reader](ac63) ‘40ants-routes/errors:existing-route‘ (namespace-duplication-error) (:existing-route)
<a id="x-2840ANTS-ROUTES-2FERRORS-3ANEW-ROUTE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3ANAMESPACE-DUPLICATION-ERROR-29-29"></a>
###### [reader](ac63) ‘40ants-routes/errors:new-route‘ (namespace-duplication-error) (:new-route)
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FERRORS-24NO-COMMON-ELEMENTS-ERROR-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### NO-COMMON-ELEMENTS-ERROR
<a id="x-2840ANTS-ROUTES-2FERRORS-3ANO-COMMON-ELEMENTS-ERROR-20CONDITION-29"></a>
###### [condition](0a57) ‘40ants-routes/errors:no-common-elements-error‘ (error)
**Readers**
<a id="x-2840ANTS-ROUTES-2FERRORS-3AFULL-NAMESPACE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3ANO-COMMON-ELEMENTS-ERROR-29-29"></a>
###### [reader](0a57) ‘40ants-routes/errors:full-namespace‘ (no-common-elements-error) (:full-namespace)
<a id="x-2840ANTS-ROUTES-2FERRORS-3ARELATIVE-NAMESPACE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3ANO-COMMON-ELEMENTS-ERROR-29-29"></a>
###### [reader](0a57) ‘40ants-routes/errors:relative-namespace‘ (no-common-elements-error) (:relative-namespace)
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FERRORS-24NO-ROUTE-FOR-URL-ERROR-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### NO-ROUTE-FOR-URL-ERROR
<a id="x-2840ANTS-ROUTES-2FERRORS-3ANO-ROUTE-FOR-URL-ERROR-20CONDITION-29"></a>
###### [condition](1b13) ‘40ants-routes/errors:no-route-for-url-error‘ (error)
**Readers**
<a id="x-2840ANTS-ROUTES-2FERRORS-3AERROR-ROUTES-PATH-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3ANO-ROUTE-FOR-URL-ERROR-29-29"></a>
###### [reader](1b13) ‘40ants-routes/errors:error-routes-path‘ (no-route-for-url-error) (:routes-path)
<a id="x-2840ANTS-ROUTES-2FERRORS-3AERROR-URL-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3ANO-ROUTE-FOR-URL-ERROR-29-29"></a>
###### [reader](1b13) ‘40ants-routes/errors:error-url‘ (no-route-for-url-error) (:url)
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FERRORS-24PATH-DUPLICATION-ERROR-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### PATH-DUPLICATION-ERROR
<a id="x-2840ANTS-ROUTES-2FERRORS-3APATH-DUPLICATION-ERROR-20CONDITION-29"></a>
###### [condition](4370) ‘40ants-routes/errors:path-duplication-error‘ (error)
**Readers**
<a id="x-2840ANTS-ROUTES-2FERRORS-3AEXISTING-PATH-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3APATH-DUPLICATION-ERROR-29-29"></a>
###### [reader](4370) ‘40ants-routes/errors:existing-path‘ (path-duplication-error) (:path)
<a id="x-2840ANTS-ROUTES-2FERRORS-3AEXISTING-ROUTE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3APATH-DUPLICATION-ERROR-29-29"></a>
###### [reader](4370) ‘40ants-routes/errors:existing-route‘ (path-duplication-error) (:existing-route)
<a id="x-2840ANTS-ROUTES-2FERRORS-3ANEW-ROUTE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3APATH-DUPLICATION-ERROR-29-29"></a>
###### [reader](4370) ‘40ants-routes/errors:new-route‘ (path-duplication-error) (:new-route)
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FERRORS-24URL-RESOLUTION-ERROR-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### URL-RESOLUTION-ERROR
<a id="x-2840ANTS-ROUTES-2FERRORS-3AURL-RESOLUTION-ERROR-20CONDITION-29"></a>
###### [condition](8ef4) ‘40ants-routes/errors:url-resolution-error‘ (error)
**Readers**
<a id="x-2840ANTS-ROUTES-2FERRORS-3ANAMESPACE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3AURL-RESOLUTION-ERROR-29-29"></a>
###### [reader](8ef4) ‘40ants-routes/errors:namespace‘ (url-resolution-error) (:namespace)
<a id="x-2840ANTS-ROUTES-2FERRORS-3AROUTE-NAME-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FERRORS-3AURL-RESOLUTION-ERROR-29-29"></a>
###### [reader](8ef4) ‘40ants-routes/errors:route-name‘ (url-resolution-error) (:route-name)
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FFIND-ROUTE-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/FIND-ROUTE
<a id="x-28-23A-28-2824-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FFIND-ROUTE-22-29-20PACKAGE-29"></a>
#### [package](b185) ‘40ants-routes/find-route‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FFIND-ROUTE-3FFunctions-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Functions
<a id="x-2840ANTS-ROUTES-2FFIND-ROUTE-3AFIND-ROUTE-20FUNCTION-29"></a>
##### [function](3d53) ‘40ants-routes/find-route:find-route‘ name &key namespace on-match
Find a route by name in the given namespace hierarchy.
If route was found, then returns it.
Additionally, it will call ‘ON-MATCH‘ callable argument
with each route node along path to the leaf route.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FGENERICS-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/GENERICS
<a id="x-28-23A-28-2822-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FGENERICS-22-29-20PACKAGE-29"></a>
#### [package](7799) ‘40ants-routes/generics‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FGENERICS-3FGenerics-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Generics
<a id="x-2840ANTS-ROUTES-2FGENERICS-3AADD-ROUTE-20GENERIC-FUNCTION-29"></a>
##### [generic-function](7fb4) ‘40ants-routes/generics:add-route‘ routes route-or-routes-to-add &key override
Add a route or included-routes object to the routes collection at runtime.
If a route with the same path or namespace already exists, an error will be signaled
unless override is set to true.
<a id="x-2840ANTS-ROUTES-2FGENERICS-3AFORMAT-URL-20GENERIC-FUNCTION-29"></a>
##### [generic-function](1f44) ‘40ants-routes/generics:format-url‘ obj stream args
Should write a piece of ‘URL‘ to the ‘STREAM‘ substituting arguments from plist ‘ARGS‘.
When called, it should write a piece of ‘URL‘ without starting backslash.
<a id="x-2840ANTS-ROUTES-2FGENERICS-3AGET-ROUTE-BREADCRUMBS-20GENERIC-FUNCTION-29"></a>
##### [generic-function](50cd) ‘40ants-routes/generics:get-route-breadcrumbs‘ node
Returns a list of breadcrumbs associated with given routes node.
‘NODE‘ argument could have [‘40ants-routes/route:route‘][377c] class, [‘40ants-routes/routes:routes‘][cce3] class or an object of other
class bound to some object of [‘40ants-routes/route:route‘][377c] class.
For objects of class [‘40ants-routes/routes:routes‘][cce3] usually the method return breadcrumbs of the
route having the ‘/‘ path.
Method can return from zero to N objects of [‘40ants-routes/breadcrumbs:breadcrumb‘][e419] class.
A returning of multiple breadcrumbs can be useful if route matches to some filename in a nested directory
and you want to give an ability to navigate into intermediate directories.
<a id="x-2840ANTS-ROUTES-2FGENERICS-3AHAS-NAMESPACE-P-20GENERIC-FUNCTION-29"></a>
##### [generic-function](5327) ‘40ants-routes/generics:has-namespace-p‘ routes
Returns T of node can respond to [‘node-namespace‘][db92] generic-function call.
<a id="x-2840ANTS-ROUTES-2FGENERICS-3AMATCH-URL-20GENERIC-FUNCTION-29"></a>
##### [generic-function](640c) ‘40ants-routes/generics:match-url‘ obj url &key on-match
Checks for complete match of the object to ‘URL‘.
Should return an ‘OBJ‘ if it fully matches to a given url.
May return a sub-object if ‘OBJ‘ matches to a prefix
and sub-object matches the rest of ‘URL‘.
If match was found, the second returned value
should be a alist with matched parameters.
If ‘ON-MATCH‘ argument is given, then in any case
of match, full or prefix, calls ‘ON-MATCH‘
function with ‘OBJ‘ as a single argument.
<a id="x-2840ANTS-ROUTES-2FGENERICS-3ANODE-NAMESPACE-20GENERIC-FUNCTION-29"></a>
##### [generic-function](222b) ‘40ants-routes/generics:node-namespace‘ routes
Returns a string name of node’s namepace. Works only for objects for which [‘has-namespace-p‘][3eec] returns true.
<a id="x-2840ANTS-ROUTES-2FGENERICS-3APARTIAL-MATCH-URL-20GENERIC-FUNCTION-29"></a>
##### [generic-function](b135) ‘40ants-routes/generics:partial-match-url‘ obj url
Tests of obj matches to the a prefix of ‘URL‘.
If match was found, should return two
values: the object which matches and position of
the character after the matched prefix.
If ‘OBJ‘ is a compound element, then
a sub-element can be returned in case of match.
<a id="x-2840ANTS-ROUTES-2FGENERICS-3AURL-PATH-20GENERIC-FUNCTION-29"></a>
##### [generic-function](45ef) ‘40ants-routes/generics:url-path‘ obj
Returns the [‘40ants-routes/url-pattern:url-pattern‘][a13f] associated with the object.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FHANDLER-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/HANDLER
<a id="x-28-23A-28-2821-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FHANDLER-22-29-20PACKAGE-29"></a>
#### [package](01b4) ‘40ants-routes/handler‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FHANDLER-3FFunctions-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Functions
<a id="x-2840ANTS-ROUTES-2FHANDLER-3ACALL-HANDLER-20FUNCTION-29"></a>
##### [function](4c47) ‘40ants-routes/handler:call-handler‘
Calls a handler of current route.
Should be called only during [‘40ants-routes/with-url:with-url‘][1c5e] macro body execution.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FINCLUDED-ROUTES-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/INCLUDED-ROUTES
<a id="x-28-23A-28-2829-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FINCLUDED-ROUTES-22-29-20PACKAGE-29"></a>
#### [package](31c6) ‘40ants-routes/included-routes‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FINCLUDED-ROUTES-3FClasses-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Classes
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FINCLUDED-ROUTES-24INCLUDED-ROUTES-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### INCLUDED-ROUTES
<a id="x-2840ANTS-ROUTES-2FINCLUDED-ROUTES-3AINCLUDED-ROUTES-20CLASS-29"></a>
###### [class](3ce2) ‘40ants-routes/included-routes:included-routes‘ ()
**Readers**
<a id="x-2840ANTS-ROUTES-2FINCLUDED-ROUTES-3AORIGINAL-ROUTES-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FINCLUDED-ROUTES-3AINCLUDED-ROUTES-29-29"></a>
###### [reader](b9bd) ‘40ants-routes/included-routes:original-routes‘ (included-routes) (:original-collection)
The original collection that was included
<a id="x-2840ANTS-ROUTES-2FGENERICS-3AURL-PATH-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FINCLUDED-ROUTES-3AINCLUDED-ROUTES-29-29"></a>
###### [reader](43c2) ‘40ants-routes/generics:url-path‘ (included-routes) (:path)
Path to add to all routes in the collection
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FINCLUDED-ROUTES-3FFunctions-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Functions
<a id="x-2840ANTS-ROUTES-2FINCLUDED-ROUTES-3AINCLUDED-ROUTES-P-20FUNCTION-29"></a>
##### [function](d0d5) ‘40ants-routes/included-routes:included-routes-p‘ obj
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FMATCHED-ROUTE-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/MATCHED-ROUTE
<a id="x-28-23A-28-2827-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FMATCHED-ROUTE-22-29-20PACKAGE-29"></a>
#### [package](4e55) ‘40ants-routes/matched-route‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FMATCHED-ROUTE-3FClasses-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Classes
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FMATCHED-ROUTE-24MATCHED-ROUTE-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### MATCHED-ROUTE
<a id="x-2840ANTS-ROUTES-2FMATCHED-ROUTE-3AMATCHED-ROUTE-20CLASS-29"></a>
###### [class](21dc) ‘40ants-routes/matched-route:matched-route‘ ()
**Readers**
<a id="x-2840ANTS-ROUTES-2FMATCHED-ROUTE-3AMATCHED-ROUTE-PARAMETERS-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FMATCHED-ROUTE-3AMATCHED-ROUTE-29-29"></a>
###### [reader](40df) ‘40ants-routes/matched-route:matched-route-parameters‘ (matched-route) (:parameters = nil)
Parameters extracted from the ‘URL‘ pattern as alist where keys are parameter names and values - parameter types.
<a id="x-2840ANTS-ROUTES-2FMATCHED-ROUTE-3AORIGINAL-ROUTE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FMATCHED-ROUTE-3AMATCHED-ROUTE-29-29"></a>
###### [reader](acf8) ‘40ants-routes/matched-route:original-route‘ (matched-route) (:original-route)
The original [‘route‘][377c] object which has been matched.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FMATCHED-ROUTE-3FFunctions-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Functions
<a id="x-2840ANTS-ROUTES-2FMATCHED-ROUTE-3AMATCHED-ROUTE-P-20FUNCTION-29"></a>
##### [function](5224) ‘40ants-routes/matched-route:matched-route-p‘ obj
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FROUTE-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/ROUTE
<a id="x-28-23A-28-2819-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FROUTE-22-29-20PACKAGE-29"></a>
#### [package](a523) ‘40ants-routes/route‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FROUTE-3FClasses-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Classes
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FROUTE-24ROUTE-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### ROUTE
<a id="x-2840ANTS-ROUTES-2FROUTE-3AROUTE-20CLASS-29"></a>
###### [class](c40a) ‘40ants-routes/route:route‘ ()
**Readers**
<a id="x-2840ANTS-ROUTES-2FROUTE-3AROUTE-HANDLER-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FROUTE-3AROUTE-29-29"></a>
###### [reader](e1d4) ‘40ants-routes/route:route-handler‘ (route) (:handler)
Function to handle the route
<a id="x-2840ANTS-ROUTES-2FROUTE-3AROUTE-METHOD-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FROUTE-3AROUTE-29-29"></a>
###### [reader](e079) ‘40ants-routes/route:route-method‘ (route) (:method = :get)
‘HTTP‘ method (‘GET‘, ‘POST‘, ‘PUT‘, etc.)
<a id="x-2840ANTS-ROUTES-2FROUTE-3AROUTE-NAME-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FROUTE-3AROUTE-29-29"></a>
###### [reader](f77b) ‘40ants-routes/route:route-name‘ (route) (:name)
Name of the route
<a id="x-2840ANTS-ROUTES-2FROUTE-3AROUTE-TITLE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FROUTE-3AROUTE-29-29"></a>
###### [reader](55fc) ‘40ants-routes/route:route-title‘ (route) (:title = nil)
Title for breadcrumbs
<a id="x-2840ANTS-ROUTES-2FGENERICS-3AURL-PATH-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FROUTE-3AROUTE-29-29"></a>
###### [reader](8221) ‘40ants-routes/generics:url-path‘ (route) (:pattern)
‘URL‘ pattern
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FURL-PATTERN-24URL-PATTERN-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### URL-PATTERN
<a id="x-2840ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-20CLASS-29"></a>
###### [class](de0b) ‘40ants-routes/url-pattern:url-pattern‘ ()
**Readers**
<a id="x-2840ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-PARAMS-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-29-29"></a>
###### [reader](4cbf) ‘40ants-routes/url-pattern:url-pattern-params‘ (url-pattern) (:params)
Alist with parameter types
<a id="x-2840ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-PATTERN-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-29-29"></a>
###### [reader](8878) ‘40ants-routes/url-pattern:url-pattern-pattern‘ (url-pattern) (:pattern)
<a id="x-2840ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-REGEX-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-29-29"></a>
###### [reader](2180) ‘40ants-routes/url-pattern:url-pattern-regex‘ (url-pattern) (:regex)
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FROUTE-3FFunctions-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Functions
<a id="x-2840ANTS-ROUTES-2FROUTE-3ACURRENT-ROUTE-20FUNCTION-29"></a>
##### [function](122f) ‘40ants-routes/route:current-route‘
Returns the current route.
Should be called only during [‘40ants-routes/with-url:with-url‘][1c5e] macro body execution.
<a id="x-2840ANTS-ROUTES-2FROUTE-3ACURRENT-ROUTE-P-20FUNCTION-29"></a>
##### [function](18bd) ‘40ants-routes/route:current-route-p‘
Returns T if there current route matching the ‘URL‘ was found..
Should be called only during [‘40ants-routes/with-url:with-url‘][1c5e]
or [‘40ants-routes/with-url:with-partially-matched-url‘][1a23] macro body execution.
<a id="x-2840ANTS-ROUTES-2FROUTE-3AROUTEP-20FUNCTION-29"></a>
##### [function](9264) ‘40ants-routes/route:routep‘ obj
Checks if ‘OBJ‘ is of [‘route‘][377c] class.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FROUTE-URL-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/ROUTE-URL
<a id="x-28-23A-28-2823-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FROUTE-URL-22-29-20PACKAGE-29"></a>
#### [package](09bb) ‘40ants-routes/route-url‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FROUTE-URL-3FFunctions-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Functions
<a id="x-2840ANTS-ROUTES-2FROUTE-URL-3AROUTE-URL-20FUNCTION-29"></a>
##### [function](61ac) ‘40ants-routes/route-url:route-url‘ name &rest args &key namespace &allow-other-keys
Generate a ‘URL‘ for a named route with the given parameters.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FROUTES-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/ROUTES
<a id="x-28-23A-28-2820-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FROUTES-22-29-20PACKAGE-29"></a>
#### [package](59ce) ‘40ants-routes/routes‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FROUTES-3FClasses-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Classes
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FROUTES-24ROUTES-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### ROUTES
<a id="x-2840ANTS-ROUTES-2FROUTES-3AROUTES-20CLASS-29"></a>
###### [class](52f1) ‘40ants-routes/routes:routes‘ ()
**Readers**
<a id="x-2840ANTS-ROUTES-2FROUTES-3ACHILDREN-ROUTES-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FROUTES-3AROUTES-29-29"></a>
###### [reader](4441) ‘40ants-routes/routes:children-routes‘ (routes) (:children = nil)
List of children in this collection.
<a id="x-2840ANTS-ROUTES-2FGENERICS-3ANODE-NAMESPACE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FROUTES-3AROUTES-29-29"></a>
###### [reader](0986) ‘40ants-routes/generics:node-namespace‘ (routes) (:namespace)
Namespace of this routes collection.
**Accessors**
<a id="x-2840ANTS-ROUTES-2FROUTES-3ACHILDREN-ROUTES-20-2840ANTS-DOC-2FLOCATIVES-3AACCESSOR-2040ANTS-ROUTES-2FROUTES-3AROUTES-29-29"></a>
###### [accessor](4441) ‘40ants-routes/routes:children-routes‘ (routes) (:children = nil)
List of children in this collection.
<a id="x-2840ANTS-ROUTES-2FGENERICS-3ANODE-NAMESPACE-20-2840ANTS-DOC-2FLOCATIVES-3AACCESSOR-2040ANTS-ROUTES-2FROUTES-3AROUTES-29-29"></a>
###### [accessor](0986) ‘40ants-routes/generics:node-namespace‘ (routes) (:namespace)
Namespace of this routes collection.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FROUTES-3FFunctions-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Functions
<a id="x-2840ANTS-ROUTES-2FROUTES-3AROUTESP-20FUNCTION-29"></a>
##### [function](e475) ‘40ants-routes/routes:routesp‘ obj
Checks if object is of class [‘routes‘][cce3].
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FROUTES-3FMacros-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Macros
<a id="x-2840ANTS-ROUTES-2FROUTES-3AROUTES-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>
##### [macro](f269) ‘40ants-routes/routes:routes‘ (namespace &key (routes-class ’routes)) &body route-definitions
Define a variable holding collection of routes the same way
as [‘40ants-routes/defroutes:defroutes‘][3455] does, but do not bind these routes to the variable.
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FURL-PATTERN-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/URL-PATTERN
<a id="x-28-23A-28-2825-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FURL-PATTERN-22-29-20PACKAGE-29"></a>
#### [package](9930) ‘40ants-routes/url-pattern‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FURL-PATTERN-3FClasses-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Classes
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FURL-PATTERN-24URL-PATTERN-3FCLASS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
##### URL-PATTERN
<a id="x-2840ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-20CLASS-29"></a>
###### [class](de0b) ‘40ants-routes/url-pattern:url-pattern‘ ()
**Readers**
<a id="x-2840ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-PARAMS-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-29-29"></a>
###### [reader](4cbf) ‘40ants-routes/url-pattern:url-pattern-params‘ (url-pattern) (:params)
Alist with parameter types
<a id="x-2840ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-PATTERN-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-29-29"></a>
###### [reader](8878) ‘40ants-routes/url-pattern:url-pattern-pattern‘ (url-pattern) (:pattern)
<a id="x-2840ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-REGEX-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-29-29"></a>
###### [reader](2180) ‘40ants-routes/url-pattern:url-pattern-regex‘ (url-pattern) (:regex)
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FURL-PATTERN-3FFunctions-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Functions
<a id="x-2840ANTS-ROUTES-2FURL-PATTERN-3APARSE-URL-PATTERN-20FUNCTION-29"></a>
##### [function](898a) ‘40ants-routes/url-pattern:parse-url-pattern‘ pattern
Parse a ‘URL‘ pattern and extract parameter specifications.
Returns an object of class [‘url-pattern‘][a13f].
<a id="x-2840ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-EQUAL-20FUNCTION-29"></a>
##### [function](9829) ‘40ants-routes/url-pattern:url-pattern-equal‘ left right
Compares two [‘url-pattern‘][a13f] objects
<a id="x-2840ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-P-20FUNCTION-29"></a>
##### [function](6b0c) ‘40ants-routes/url-pattern:url-pattern-p‘ obj
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-4040ANTS-ROUTES-2FWITH-URL-3FPACKAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
### 40ANTS-ROUTES/WITH-URL
<a id="x-28-23A-28-2822-29-20BASE-CHAR-20-2E-20-2240ANTS-ROUTES-2FWITH-URL-22-29-20PACKAGE-29"></a>
#### [package](983b) ‘40ants-routes/with-url‘
<a id="x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-7C-4040ANTS-ROUTES-2FWITH-URL-3FMacros-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
#### Macros
<a id="x-2840ANTS-ROUTES-2FWITH-URL-3AWITH-PARTIALLY-MATCHED-URL-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>
##### [macro](6cef) ‘40ants-routes/with-url:with-partially-matched-url‘ (root-routes url) &body body
Execute body with the current routes object corresponding to a given ‘URL‘ argument.
Difference between this macro and [‘with-url‘][1c5e] macro is that [‘with-url‘][1c5e] signals an error
if it is unable to find a leaf route matching to the whole ‘URL‘.
[‘with-partially-matched-url‘][1a23] will try to find a routes path matching as much
of ‘URL‘ as possible. As the result, [‘40ants-routes/route:current-route-p‘][087c] function
might return ‘NIL‘ when ‘URL‘ was not fully matched by [‘with-partially-matched-url‘][1a23].
<a id="x-2840ANTS-ROUTES-2FWITH-URL-3AWITH-URL-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>
##### [macro](56f3) ‘40ants-routes/with-url:with-url‘ (root-routes url) &body body
Execute body with the current routes object corresponding to a given ‘URL‘ argument.
[7261]: https://40ants.com/routes
[e419]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-20CLASS-29
[3f6e]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-PATH-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-29-29
[920e]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-ROUTE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-29-29
[b28f]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-TITLE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-2040ANTS-ROUTES-2FBREADCRUMBS-3ABREADCRUMB-29-29
[bd21]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FBREADCRUMBS-3AGET-BREADCRUMBS-20FUNCTION-29
[3455]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FDEFROUTES-3ADEFROUTES-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29
[f902]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FDEFROUTES-3AGET-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29
[2897]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FDEFROUTES-3AINCLUDE-20FUNCTION-29
[a861]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FDEFROUTES-3APOST-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29
[c587]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FDEFROUTES-3APUT-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29
[2977]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FERRORS-3ANO-ROUTE-FOR-URL-ERROR-20CONDITION-29
[3eec]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FGENERICS-3AHAS-NAMESPACE-P-20GENERIC-FUNCTION-29
[db92]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FGENERICS-3ANODE-NAMESPACE-20GENERIC-FUNCTION-29
[e530]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FHANDLER-3ACALL-HANDLER-20FUNCTION-29
[087c]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FROUTE-3ACURRENT-ROUTE-P-20FUNCTION-29
[377c]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FROUTE-3AROUTE-20CLASS-29
[fe8a]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FROUTE-URL-3AROUTE-URL-20FUNCTION-29
[77f9]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FROUTES-3AROUTES-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29
[cce3]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FROUTES-3AROUTES-20CLASS-29
[a13f]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FURL-PATTERN-3AURL-PATTERN-20CLASS-29
[1a23]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FWITH-URL-3AWITH-PARTIALLY-MATCHED-URL-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29
[1c5e]: https://40ants.com/routes/#x-2840ANTS-ROUTES-2FWITH-URL-3AWITH-URL-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29
[d39a]: https://40ants.com/routes/#x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-40DEFINING-ROUTES-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29
[af0d]: https://40ants.com/routes/#x-2840ANTS-ROUTES-DOCS-2FINDEX-3A-3A-40MATCHING-THE-URL-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29
[6959]: https://github.com/40ants/routes
[80be]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/breadcrumbs.lisp#L1
[6b1c]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/breadcrumbs.lisp#L35
[895a]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/breadcrumbs.lisp#L36
[5dcf]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/breadcrumbs.lisp#L39
[27fe]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/breadcrumbs.lisp#L42
[dec1]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/breadcrumbs.lisp#L84
[53c4]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/breadcrumbs.lisp#L92
[31be]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/defroutes.lisp#L1
[8a76]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/defroutes.lisp#L120
[bb9a]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/defroutes.lisp#L124
[aba5]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/defroutes.lisp#L128
[c5b9]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/defroutes.lisp#L140
[f7eb]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/defroutes.lisp#L34
[f269]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/defroutes.lisp#L72
[2356]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/errors.lisp#L1
[0a57]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/errors.lisp#L24
[ac63]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/errors.lisp#L35
[4370]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/errors.lisp#L49
[1b13]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/errors.lisp#L63
[8ef4]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/errors.lisp#L74
[4f03]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/errors.lisp#L85
[b185]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/find-route.lisp#L1
[3d53]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/find-route.lisp#L103
[7799]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/generics.lisp#L1
[640c]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/generics.lisp#L14
[b135]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/generics.lisp#L30
[1f44]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/generics.lisp#L42
[45ef]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/generics.lisp#L48
[5327]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/generics.lisp#L52
[222b]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/generics.lisp#L58
[7fb4]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/generics.lisp#L62
[50cd]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/generics.lisp#L68
[01b4]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/handler.lisp#L1
[4c47]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/handler.lisp#L15
[31c6]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/included-routes.lisp#L1
[3ce2]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/included-routes.lisp#L20
[b9bd]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/included-routes.lisp#L21
[43c2]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/included-routes.lisp#L25
[d0d5]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/included-routes.lisp#L39
[4e55]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/matched-route.lisp#L1
[21dc]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/matched-route.lisp#L22
[acf8]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/matched-route.lisp#L23
[40df]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/matched-route.lisp#L27
[5224]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/matched-route.lisp#L44
[09bb]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route-url.lisp#L1
[61ac]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route-url.lisp#L27
[a523]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route.lisp#L1
[c40a]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route.lisp#L32
[f77b]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route.lisp#L33
[8221]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route.lisp#L37
[e1d4]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route.lisp#L41
[55fc]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route.lisp#L45
[e079]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route.lisp#L50
[9264]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route.lisp#L68
[18bd]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route.lisp#L80
[122f]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/route.lisp#L88
[59ce]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/routes.lisp#L1
[52f1]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/routes.lisp#L21
[4441]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/routes.lisp#L22
[0986]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/routes.lisp#L26
[e475]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/routes.lisp#L39
[9930]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/url-pattern.lisp#L1
[6b0c]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/url-pattern.lisp#L172
[9829]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/url-pattern.lisp#L179
[de0b]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/url-pattern.lisp#L24
[8878]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/url-pattern.lisp#L25
[2180]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/url-pattern.lisp#L28
[4cbf]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/url-pattern.lisp#L31
[898a]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/url-pattern.lisp#L46
[983b]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/with-url.lisp#L1
[6cef]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/with-url.lisp#L112
[56f3]: https://github.com/40ants/routes/blob/b599659e5cbe7655ff69a9d4298359de9ef65acd/src/with-url.lisp#L86
[54bf]: https://github.com/40ants/routes/issues
[8236]: https://quickdocs.org/alexandria
[49b9]: https://quickdocs.org/cl-ppcre
[c41d]: https://quickdocs.org/serapeum
[3dcd]: https://quickdocs.org/split-sequence
[ef7f]: https://quickdocs.org/str
* * *
###### [generated by [40ANTS-DOC](https://40ants.com/doc/)]
0.4.0
40ants-asdf-system
(system).
40ants-routes/route
(system).
40ants-routes/routes
(system).
40ants-routes/included-routes
(system).
40ants-routes/url-pattern
(system).
40ants-routes/with-url
(system).
40ants-routes/find-route
(system).
40ants-routes/defroutes
(system).
40ants-routes/route-url
(system).
40ants-routes/breadcrumbs
(system).
40ants-routes/utils
(system).
40ants-routes/add-route
(system).
cl-ppcre
(system).
split-sequence
(system).
40ants-routes/route
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
str
(system).
serapeum
(system).
40ants-routes/errors
(system).
40ants-routes/url-pattern
(system).
40ants-routes/generics
(system).
40ants-routes/vars
(system).
40ants-routes/errors
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
40ants-routes/url-pattern
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
cl-ppcre
(system).
serapeum
(system).
str
(system).
40ants-routes/generics
(system).
40ants-routes/generics
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
40ants-routes/vars
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
serapeum
(system).
40ants-routes/routes
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
40ants-routes/generics
(system).
serapeum
(system).
40ants-routes/errors
(system).
40ants-routes/included-routes
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
40ants-routes/routes
(system).
40ants-routes/url-pattern
(system).
40ants-routes/generics
(system).
40ants-routes/with-url
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
serapeum
(system).
40ants-routes/errors
(system).
40ants-routes/routes
(system).
40ants-routes/route
(system).
40ants-routes/included-routes
(system).
40ants-routes/vars
(system).
40ants-routes/generics
(system).
40ants-routes/matched-route
(system).
40ants-routes/matched-route
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
serapeum
(system).
40ants-routes/route
(system).
40ants-routes/url-pattern
(system).
40ants-routes/generics
(system).
40ants-routes/find-route
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
40ants-routes/vars
(system).
40ants-routes/route
(system).
40ants-routes/routes
(system).
40ants-routes/included-routes
(system).
serapeum
(system).
alexandria
(system).
40ants-routes/generics
(system).
40ants-routes/defroutes
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
40ants-routes/route
(system).
40ants-routes/routes
(system).
40ants-routes/included-routes
(system).
40ants-routes/url-pattern
(system).
serapeum
(system).
alexandria
(system).
40ants-routes/generics
(system).
str
(system).
40ants-routes/route-url
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
40ants-routes/vars
(system).
40ants-routes/find-route
(system).
40ants-routes/generics
(system).
40ants-routes/utils
(system).
serapeum
(system).
40ants-routes/errors
(system).
40ants-routes/utils
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
40ants-routes/errors
(system).
40ants-routes/breadcrumbs
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
40ants-routes/route
(system).
serapeum
(system).
40ants-routes/generics
(system).
40ants-routes/vars
(system).
40ants-routes/included-routes
(system).
40ants-routes/routes
(system).
alexandria
(system).
40ants-routes/matched-route
(system).
40ants-routes/add-route
Alexander Artemenko <svetlyak.40wt@gmail.com>
(GIT https://github.com/40ants/routes)
Unlicense
40ants-routes/generics
(system).
40ants-routes/routes
(system).
40ants-routes/route
(system).
40ants-routes/defroutes
(system).
40ants-routes/included-routes
(system).
40ants-routes/errors
(system).
serapeum
(system).
40ants-routes/url-pattern
(system).
Files are sorted by type and then listed depth-first from the systems components trees.
40ants-routes/40ants-routes.asd
40ants-routes/route/file-type.lisp
40ants-routes/errors/file-type.lisp
40ants-routes/url-pattern/file-type.lisp
40ants-routes/generics/file-type.lisp
40ants-routes/vars/file-type.lisp
40ants-routes/routes/file-type.lisp
40ants-routes/included-routes/file-type.lisp
40ants-routes/with-url/file-type.lisp
40ants-routes/matched-route/file-type.lisp
40ants-routes/find-route/file-type.lisp
40ants-routes/defroutes/file-type.lisp
40ants-routes/route-url/file-type.lisp
40ants-routes/utils/file-type.lisp
40ants-routes/breadcrumbs/file-type.lisp
40ants-routes/add-route/file-type.lisp
40ants-routes/40ants-routes.asd
40ants-routes
(system).
40ants-routes
.
40ants-routes/route
.
40ants-routes/errors
.
40ants-routes/url-pattern
.
40ants-routes/generics
.
40ants-routes/vars
.
40ants-routes/routes
.
40ants-routes/included-routes
.
40ants-routes/with-url
.
40ants-routes/matched-route
.
40ants-routes/find-route
.
40ants-routes/defroutes
.
40ants-routes/route-url
.
40ants-routes/utils
.
40ants-routes/breadcrumbs
.
40ants-routes/add-route
.
40ants-routes/route/file-type.lisp
40ants-routes/route
(system).
current-route
(function).
current-route-p
(function).
format-url
(method).
format-url
(method).
print-object
(method).
route
(class).
route-handler
(reader method).
route-method
(reader method).
route-name
(reader method).
route-title
(reader method).
routep
(function).
url-path
(reader method).
replace-parameters
(function).
40ants-routes/errors/file-type.lisp
40ants-routes/errors
(system).
argument-missing-error
(condition).
argument-missing-error-parameter
(reader method).
argument-missing-error-route-name
(reader method).
error-routes-path
(reader method).
error-url
(reader method).
existing-namespace
(reader method).
existing-path
(reader method).
existing-route
(reader method).
existing-route
(reader method).
full-namespace
(reader method).
namespace
(reader method).
namespace-duplication-error
(condition).
new-route
(reader method).
new-route
(reader method).
no-common-elements-error
(condition).
no-route-for-url-error
(condition).
path-duplication-error
(condition).
relative-namespace
(reader method).
route-name
(reader method).
url-resolution-error
(condition).
40ants-routes/url-pattern/file-type.lisp
40ants-routes/url-pattern
(system).
match-url
(method).
parse-url-pattern
(function).
partial-match-url
(method).
print-object
(method).
url-pattern
(class).
url-pattern-equal
(function).
url-pattern-p
(function).
url-pattern-params
(reader method).
url-pattern-pattern
(reader method).
url-pattern-regex
(reader method).
match-url
(function).
40ants-routes/generics/file-type.lisp
40ants-routes/generics
(system).
add-route
(generic function).
format-url
(generic function).
get-route-breadcrumbs
(generic function).
has-namespace-p
(generic function).
match-url
(generic function).
node-namespace
(generic function).
partial-match-url
(generic function).
url-path
(generic function).
40ants-routes/vars/file-type.lisp
40ants-routes/vars
(system).
*current-namespace*
(special variable).
*current-route*
(special variable).
*routes-path*
(special variable).
40ants-routes/routes/file-type.lisp
40ants-routes/routes
(system).
children-routes
(reader method).
(setf children-routes)
(writer method).
(setf children-routes)
(method).
format-url
(method).
has-namespace-p
(method).
match-url
(method).
node-namespace
(reader method).
(setf node-namespace)
(writer method).
print-object
(method).
routes
(class).
routesp
(function).
40ants-routes/included-routes/file-type.lisp
40ants-routes/included-routes
(system).
children-routes
(method).
format-url
(method).
has-namespace-p
(method).
included-routes
(class).
included-routes-p
(function).
match-url
(method).
node-namespace
(method).
original-routes
(reader method).
print-object
(method).
url-path
(reader method).
40ants-routes/with-url/file-type.lisp
40ants-routes/with-url
(system).
with-partially-matched-url
(macro).
with-url
(macro).
call-with-partially-matched-url
(function).
call-with-url
(function).
find-route-for-url
(function).
40ants-routes/matched-route/file-type.lisp
40ants-routes/matched-route
(system).
get-route-breadcrumbs
(method).
match-url
(method).
matched-route
(class).
matched-route-p
(function).
matched-route-parameters
(reader method).
original-route
(reader method).
print-object
(method).
route-handler
(method).
route-method
(method).
route-name
(method).
route-title
(method).
url-path
(method).
def-proxy-method
(macro).
40ants-routes/find-route/file-type.lisp
40ants-routes/find-route
(system).
find-route
(function).
absolute-namespace-p
(function).
search-child-route-with-name
(function).
search-routes-with-namespace
(function).
40ants-routes/defroutes/file-type.lisp
40ants-routes/defroutes
(system).
delete
(macro).
generate-route
(function).
40ants-routes/route-url/file-type.lisp
40ants-routes/route-url
(system).
route-url
(function).
40ants-routes/utils/file-type.lisp
40ants-routes/utils
(system).
make-new-namespace
(function).
40ants-routes/breadcrumbs/file-type.lisp
40ants-routes/breadcrumbs
(system).
breadcrumb
(class).
breadcrumb-path
(reader method).
breadcrumb-route
(reader method).
breadcrumb-title
(reader method).
get-breadcrumbs
(function).
get-route-breadcrumbs
(method).
get-route-breadcrumbs
(method).
get-route-breadcrumbs
(method).
get-route-breadcrumbs
(method).
make-breadcrumb
(function).
print-object
(method).
*breadcrumbs-path*
(special variable).
current-breadcrumb-path
(function).
current-breadcrumb-route
(function).
40ants-routes/add-route/file-type.lisp
40ants-routes/add-route
(system).
search-route-with-namespace
(function).
search-route-with-path
(function).
Packages are listed by definition order.
40ants-routes/generics
40ants-routes/matched-route
40ants-routes/errors
40ants-routes/utils
40ants-routes/with-url
40ants-routes/vars
40ants-routes/breadcrumbs
40ants-routes/route-url
40ants-routes/url-pattern
40ants-routes/add-route
40ants-routes/defroutes
40ants-routes/route
40ants-routes/included-routes
40ants-routes/routes
40ants-routes/find-route
40ants-routes/generics
common-lisp
.
add-route
(generic function).
format-url
(generic function).
get-route-breadcrumbs
(generic function).
has-namespace-p
(generic function).
match-url
(generic function).
node-namespace
(generic function).
(setf node-namespace)
(generic writer).
partial-match-url
(generic function).
url-path
(generic function).
40ants-routes/matched-route
common-lisp
.
matched-route
(class).
matched-route-p
(function).
matched-route-parameters
(generic reader).
original-route
(generic reader).
def-proxy-method
(macro).
40ants-routes/errors
common-lisp
.
argument-missing-error
(condition).
argument-missing-error-parameter
(generic reader).
argument-missing-error-route-name
(generic reader).
error-routes-path
(generic reader).
error-url
(generic reader).
existing-namespace
(generic reader).
existing-path
(generic reader).
existing-route
(generic reader).
full-namespace
(generic reader).
namespace
(generic reader).
namespace-duplication-error
(condition).
new-route
(generic reader).
no-common-elements-error
(condition).
no-route-for-url-error
(condition).
path-duplication-error
(condition).
relative-namespace
(generic reader).
route-name
(generic reader).
url-resolution-error
(condition).
40ants-routes/with-url
common-lisp
.
with-partially-matched-url
(macro).
with-url
(macro).
call-with-partially-matched-url
(function).
call-with-url
(function).
find-route-for-url
(function).
40ants-routes/vars
common-lisp
.
*current-namespace*
(special variable).
*current-route*
(special variable).
*routes-path*
(special variable).
40ants-routes/breadcrumbs
common-lisp
.
breadcrumb
(class).
breadcrumb-path
(generic reader).
breadcrumb-route
(generic reader).
breadcrumb-title
(generic reader).
get-breadcrumbs
(function).
make-breadcrumb
(function).
*breadcrumbs-path*
(special variable).
current-breadcrumb-path
(function).
current-breadcrumb-route
(function).
40ants-routes/url-pattern
common-lisp
.
parse-url-pattern
(function).
url-pattern
(class).
url-pattern-equal
(function).
url-pattern-p
(function).
url-pattern-params
(generic reader).
url-pattern-pattern
(generic reader).
url-pattern-regex
(generic reader).
match-url
(function).
40ants-routes/add-route
common-lisp
.
search-route-with-namespace
(function).
search-route-with-path
(function).
40ants-routes/defroutes
common-lisp
.
delete
(macro).
generate-route
(function).
40ants-routes/route
common-lisp
.
current-route
(function).
current-route-p
(function).
route
(slot).
route
(class).
route-handler
(generic function).
route-method
(generic function).
route-name
(generic function).
route-title
(generic function).
routep
(function).
replace-parameters
(function).
40ants-routes/included-routes
common-lisp
.
included-routes
(class).
included-routes-p
(function).
original-routes
(generic reader).
40ants-routes/routes
common-lisp
.
children-routes
(generic function).
(setf children-routes)
(generic function).
routes
(macro).
routes
(class).
routesp
(function).
40ants-routes/find-route
common-lisp
.
find-route
(function).
absolute-namespace-p
(function).
search-child-route-with-name
(function).
search-routes-with-namespace
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Define a variable holding collection of routes and binds it to a variable VAR-NAME.
This macro acts like a DEFVAR - if there is already an 40ANTS-ROUTES/ROUTES:ROUTES
object bound to the variable, then it is not replaced, but updated inplace.
This allows to change routes on the fly even if they were included into some routes
hierarchy.
You can use ROUTES-CLASS argument to supply you own class, inherited from ROUTES.
This way it might be possible to special processing for these routes, for example,
inject some special code for representing this routes in the "breadcrumbs".
Use GET, POST, PUT, DELETE macros in ROUTE-DEFINITIONS forms.
See more examples how to define routes in the 40ANTS-ROUTES-DOCS/INDEX::@DEFINING-ROUTES section.
Define a variable holding collection of routes the same way
as 40ANTS-ROUTES/DEFROUTES:DEFROUTES does, but do not bind these routes to the variable.
Execute body with the current routes object corresponding to a given URL argument.
Difference between this macro and WITH-URL macro is that WITH-URL signals an error
if it is unable to find a leaf route matching to the whole URL.
WITH-PARTIALLY-MATCHED-URL will try to find a routes path matching as much
of URL as possible. As the result, 40ANTS-ROUTES/ROUTE:CURRENT-ROUTE-P function
might return NIL when URL was not fully matched by WITH-PARTIALLY-MATCHED-URL.
Execute body with the current routes object corresponding to a given URL argument.
Returns the current route.
Should be called only during 40ANTS-ROUTES/WITH-URL:WITH-URL macro body execution.
Returns T if there current route matching the URL was found..
Should be called only during 40ANTS-ROUTES/WITH-URL:WITH-URL
or 40ANTS-ROUTES/WITH-URL:WITH-PARTIALLY-MATCHED-URL macro body execution.
Find a route by name in the given namespace hierarchy.
If route was found, then returns it.
Additionally, it will call ON-MATCH callable argument with each route node along path to the leaf route.
Generate breadcrumbs list for the current URL set by 40ANTS-ROUTES/WITH-URL:WITH-URL macro.
Creates a breadcrumb item.
Parse a URL pattern and extract parameter specifications.
Returns an object of class URL-PATTERN.
Generate a URL for a named route with the given parameters.
Checks if OBJ is of ROUTE class.
Checks if object is of class ROUTES.
Compares two URL-PATTERN objects
Add a route or included-routes object to the routes collection at runtime.
If a route with the same path or namespace already exists, an error will be signaled
unless override is set to true.
routes
) (route included-routes
) &key override) ¶Add any other type of object to the routes collection at runtime.
If the object has a namespace and a route with the same namespace already exists,
an error will be signaled unless override is true.
routes
) (routes-to-add routes
) &key override) ¶We only allow to include objects of ROUTE or INCLUDED-ROUTES type.
Thus we should wrap ROUTES with INCLUDED-ROUTES and path /
argument-missing-error
)) ¶argument-missing-error
)) ¶breadcrumb
)) ¶automatically generated reader method
path
.
breadcrumb
)) ¶automatically generated reader method
breadcrumb
)) ¶automatically generated reader method
included-routes
)) ¶no-route-for-url-error
)) ¶no-route-for-url-error
)) ¶url
.
namespace-duplication-error
)) ¶path-duplication-error
)) ¶path
.
path-duplication-error
)) ¶namespace-duplication-error
)) ¶Should write a piece of URL to the STREAM substituting arguments from plist ARGS.
When called, it should write a piece of URL without starting backslash.
included-routes
) stream args) ¶url-pattern
) stream args) ¶no-common-elements-error
)) ¶Returns a list of breadcrumbs associated with given routes node.
NODE argument could have 40ANTS-ROUTES/ROUTE:ROUTE class, 40ANTS-ROUTES/ROUTES:ROUTES class or an object of other
class bound to some object of 40ANTS-ROUTES/ROUTE:ROUTE class.
For objects of class 40ANTS-ROUTES/ROUTES:ROUTES usually the method return breadcrumbs of the
route having the ‘/‘ path.
Method can return from zero to N objects of 40ANTS-ROUTES/BREADCRUMBS:BREADCRUMB class.
A returning of multiple breadcrumbs can be useful if route matches to some filename in a nested directory
and you want to give an ability to navigate into intermediate directories.
included-routes
)) ¶matched-route
)) ¶Returns T of node can respond to NODE-NAMESPACE generic-function call.
included-routes
)) ¶Checks for complete match of the object to URL.
Should return an OBJ if it fully matches to a given url.
May return a sub-object if OBJ matches to a prefix
and sub-object matches the rest of URL.
If match was found, the second returned value
should be a alist with matched parameters.
If ON-MATCH argument is given, then in any case
of match, full or prefix, calls ON-MATCH
function with OBJ as a single argument.
included-routes
) (url string
) &key on-match) ¶url-pattern
) (url string
) &key on-match) ¶matched-route
)) ¶Parameters extracted from the URL pattern as alist where keys are parameter names and values - parameter types.
url-resolution-error
)) ¶path-duplication-error
)) ¶namespace-duplication-error
)) ¶Returns a string name of node’s namepace. Works only for objects for which HAS-NAMESPACE-P returns true.
included-routes
)) ¶matched-route
)) ¶The original ROUTE object which has been matched.
included-routes
)) ¶The original collection that was included
Tests of obj matches to the a prefix of URL.
If match was found, should return two
values: the object which matches and position of
the character after the matched prefix.
If OBJ is a compound element, then
a sub-element can be returned in case of match.
url-pattern
) (url string
)) ¶no-common-elements-error
)) ¶matched-route
)) ¶matched-route
)) ¶url-resolution-error
)) ¶matched-route
)) ¶matched-route
)) ¶Returns the 40ANTS-ROUTES/URL-PATTERN:URL-PATTERN associated with the object.
matched-route
)) ¶included-routes
)) ¶Path to add to all routes in the collection
path
.
url-pattern
)) ¶Alist with parameter types
url-pattern
)) ¶automatically generated reader method
url-pattern
)) ¶automatically generated reader method
matched-route
) stream) ¶breadcrumb
) stream) ¶url-pattern
) stream) ¶included-routes
) stream) ¶error
.
A path of routes corresponding matching to the prefix of the current URL.
:routes-path
This slot is read-only.
error
.
:route-name
This slot is read-only.
string
:path
This slot is read-only.
string
:title
This slot is read-only.
40ants-routes/route:route
:route
This slot is read-only.
The original collection that was included
40ants-routes/routes:routes
:original-collection
This slot is read-only.
The original ROUTE object which has been matched.
40ants-routes/route:route
:original-route
This slot is read-only.
Parameters extracted from the URL pattern as alist where keys are parameter names and values - parameter types.
(serapeum:soft-alist-of keyword (or integer string))
:parameters
This slot is read-only.
Name of the route
string
:name
This slot is read-only.
URL pattern
40ants-routes/url-pattern:url-pattern
:pattern
This slot is read-only.
Function to handle the route
function
:handler
This slot is read-only.
Title for breadcrumbs
(or null string function)
:title
This slot is read-only.
HTTP method (GET, POST, PUT, etc.)
common-lisp
.
keyword
:get
:method
This slot is read-only.
string
:pattern
This slot is read-only.
string
:regex
This slot is read-only.
Alist with parameter types
list
:params
This slot is read-only.
Current namespace of the current route. Will be bound during WITH-URL macro body exectution.
Holds a list of namespace names starting from the current route’s namespace and ending with root routes node.
Current route collection for route resolution.
This variable will be bound during WITH-URL macro body execution.
It contains a chain of routes matched to the given url.
For example if we call WITH-URL on /company/blog/post-slug, then
in the *ROUTES-PATH* will be three items:
“‘
(lisp (ROUTE /post-slug)
(INCLUDED-ROUTES /blog/)
(INCLUDED-ROUTES /company/))
“‘
Searches a route matching URL.
URL can match some nested route.
A helper to use in your own macro to create routes
Create a new namespace by combining the full namespace of the current page
with a partial namespace of the target page.
Examples:
“‘
(make-new-namespace ’("server" "app" "blog" "post")
’("app" "admin" "users"))
;; => ("server" "app" "admin" "users")
(make-new-namespace ’("server" "app" "blog" "post")
’("blog" "moderation" "posts"))
;; => ("server" "app" "blog" "moderation" "posts")
(make-new-namespace ’("server" "app" "blog" "post")
’("app"))
;; => ("server" "app")
(make-new-namespace ’("server" "app" "blog" "post")
’("server" "another-app" "images"))
;; => ("server" "another-app" "images")
(make-new-namespace ’("server" "app" "blog" "post")
’("some-other-server" "app" "admin"))
;; => signals error NO-COMMON-ELEMENTS-ERROR
“‘
Match a URL against a route.
Returns three values where:
- first will be T if pattern was matched
- the second value is parameter values alist
- and the third one is position of the character right after the matched piece of URL
If PARTIALP argument is T then full match is required and the third returned value will be equal to a URL length.
Replace parameters in a URL pattern with their values.
- URL-PATTERN - The original URL pattern (e.g., ’/<string:slug>’) - ARGS - Property list of parameter values (:name value ...)
If given, ON-MATCH callable will be called starting from the root node to the last routes object matching the last namespace in the list.
Jump to: | (
A B C D E F G H I M N O P R S U W |
---|
Jump to: | (
A B C D E F G H I M N O P R S U W |
---|
Jump to: | *
C E F H M N O P R S T U |
---|
Jump to: | *
C E F H M N O P R S T U |
---|
Jump to: | 4
A B C F I M N P R S U |
---|
Jump to: | 4
A B C F I M N P R S U |
---|