base/src/sqwl/cms/layout/PrimaryView.scala
changeset 13 216da61215db
parent 12 e7512f9dc903
child 19 83fb90bdd15b
--- a/base/src/sqwl/cms/layout/PrimaryView.scala	Thu Dec 06 15:19:41 2018 +0100
+++ b/base/src/sqwl/cms/layout/PrimaryView.scala	Thu Dec 06 16:18:26 2018 +0100
@@ -4,11 +4,13 @@
 import scalatags.Text.{TypedTag, tags2}
 import sqwl.cms._
 
-object PrimaryView extends config {
+object PrimaryView extends config with UrlScheme {
   def apply(cnt: iContent, st: ViewState): Option[TypedTag[String]] =
     st match {
       case ViewArticle(art) => Some(tags2.section(
         h1(a(href:=s"/${http.prefix}/${art.pathSegment}", art.title)),
+        div(cls:="row", art.tags.map(t =>
+          a(href:=s"/${http.prefix}/$TAG/${t.pathSegment}", cls:="tag", s"(${t.name})"))),
         raw(art.htmlContent)
       ))
       case _ => None