   (str name
        (if akas
          (str " (a.k.a. " (clojure.string/join ", " akas) ")"))))
+
+(defn- xref-link [r] (str "/records/" (:xref r)))
 
 (html/defsnippet individual-page-snippet "site/templates/record.html" [:div#individual-record]
   [record]


  [:#spouse]
  (html/clone-for [spouse (:spouses record)]
                  [:#person-info] (html/set-attr :href (str "/records/" (:xref spouse)) )
                  [:#person-info] (html/content (:name spouse)))

  [:#married :#event-info]


  [:#child]
  (html/clone-for [child (:children record)]
                  [:#person-info] (html/set-attr :href (xref-link child))
                  [:#person-info] (html/content (:name child)))
  )

