Commit a584402f by Anton Sudak

Fix accidently broken support of the navigation on standalone pages

parent 5cf22e0f
......@@ -12,5 +12,8 @@
@logger = @{ org.slf4j.LoggerFactory.getLogger("_navigationByKey.scala.html") }
@Option(PageBlock.find.byKey(key)).map { root =>
@_navigation(root, Option(active).map { case p: PageBlock => p }.getOrElse(null), level + 1)
@_navigation(root, Option(active).flatMap {
case p: PageBlock => { Some(p) }
case _ => { None }
}.orNull, level + 1)
}.getOrElse(() => logger.warn("_navigation: Could not load root page with key " + key))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment