This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-03
Channels
- # announcements (11)
- # aws (1)
- # beginners (57)
- # calva (14)
- # cider (22)
- # clara (23)
- # cljdoc (21)
- # cljs-dev (14)
- # clojure (76)
- # clojure-austin (3)
- # clojure-europe (32)
- # clojure-finland (1)
- # clojure-gamedev (5)
- # clojure-italy (3)
- # clojure-nl (17)
- # clojure-poland (4)
- # clojure-spec (23)
- # clojure-uk (29)
- # clojurescript (72)
- # cursive (6)
- # data-science (4)
- # datomic (2)
- # dirac (10)
- # duct (3)
- # emacs (1)
- # figwheel-main (10)
- # fulcro (86)
- # jackdaw (5)
- # juxt (2)
- # kaocha (2)
- # leiningen (16)
- # off-topic (47)
- # pathom (46)
- # protorepl (2)
- # reagent (4)
- # reitit (14)
- # ring-swagger (5)
- # shadow-cljs (43)
- # spacemacs (13)
- # sql (13)
- # tools-deps (6)
I’m having a lot of nested routes. The Match
gives me the last one. Is there a way I could also get grab of the parent ones as well?
Use case is: I have a sidebar navigation. I want the “list” element to be highlighted when I a “child” route is activated.
["/messages"
{:data "..."}
[""
{:name :message-list}]
["/:message-id"
{:name :message-detail}]]
So if my URL is “/messages/abc”, I’d like somehow to get [:message-list :message-id]
from reitit.
@orestis currently the info is not available, but the fragments could be pushed into Match
. Per today, you can have an extra key like :section
which is a set/vector. Meta-merge accumulates those normally.
Right, so instead of relying on :name
which is special for reitit, I should use my own :section
to do any kind of matching I want
there is https://github.com/metosin/reitit/issues/175 too, bit related
(I use this feature for breadcrumbs, :crumbs
is a vector which naturally accumulates down — cool stuff!)