url parameter
This commit is contained in:
+6
-2
@@ -36,14 +36,18 @@
|
|||||||
(defparameter *template-product* "
|
(defparameter *template-product* "
|
||||||
<body>
|
<body>
|
||||||
{{ product }}
|
{{ product }}
|
||||||
|
{% if debug %}
|
||||||
|
debug info!
|
||||||
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
")
|
")
|
||||||
|
|
||||||
(easy-routes:defroute root ("/") ()
|
(easy-routes:defroute root ("/") ()
|
||||||
(render *template-root* :products (products)))
|
(render *template-root* :products (products)))
|
||||||
|
|
||||||
(easy-routes:defroute product-route ("/product/:n") (&path (n 'integer))
|
(easy-routes:defroute product-route ("/product/:n")
|
||||||
(render *template-product* :product (get-product n)))
|
(&get debug &path (n 'integer))
|
||||||
|
(render *template-product* :product (get-product n) :debug debug))
|
||||||
|
|
||||||
(defroute root ("/" :method :get) ()
|
(defroute root ("/" :method :get) ()
|
||||||
(render-products))
|
(render-products))
|
||||||
|
|||||||
Reference in New Issue
Block a user