Skip to content

Instantly share code, notes, and snippets.

@rads
Created November 27, 2011 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rads/1397711 to your computer and use it in GitHub Desktop.
Save rads/1397711 to your computer and use it in GitHub Desktop.
; before
(defpage "/photos" {}
  (common/main-layout (...)))
(defpage "/photos/:id" {id :id}
  (common/main-layout (...)))
(defpage "/photos/:id/edit" {id :id}
  (common/main-layout (...)))
; after
(add-wrapper ["/photos" "/photos/:id" "/photos/:id/edit"] {} [resp]
  (if (str? resp)
    (common/main-layout resp)
    resp))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment